io.undertow.server.handlers

## Class JDBCLogHandler

- java.lang.Object
- - io.undertow.server.handlers.JDBCLogHandler

All Implemented Interfaces:
  HttpHandler, Runnable

    public class JDBCLogHandler
    extends Object
    implements HttpHandler, Runnable

### Nested Class Summary

Nested Classes
`static class` `JDBCLogHandler.Builder`

### Field Summary

Fields
`protected boolean` `useLongContentLength`

### Constructor Summary

Constructors
Constructor and Description
`JDBCLogHandler(HttpHandler next, Executor logWriteExecutor, String formatString, DataSource dataSource)` Deprecated.
`JDBCLogHandler(HttpHandler next, String formatString, DataSource dataSource)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getBytesField()`
`String` `getMethodField()`
`String` `getQueryField()`
`String` `getRefererField()`
`String` `getRemoteHostField()`
`String` `getStatusField()`
`String` `getTableName()`
`String` `getTimestampField()`
`String` `getUserAgentField()`
`String` `getUserField()`
`String` `getVirtualHostField()`
`void` `handleRequest(HttpServerExchange exchange)` Handle the request.
`boolean` `isUseLongContentLength()`
`void` `logMessage(String pattern, HttpServerExchange exchange)`
`void` `run()` insert the log record to database
`void` `setBytesField(String bytesField)`
`void` `setMethodField(String methodField)`
`void` `setQueryField(String queryField)`
`void` `setRefererField(String refererField)`
`void` `setRemoteHostField(String remoteHostField)`
`void` `setStatusField(String statusField)`
`void` `setTableName(String tableName)`
`void` `setTimestampField(String timestampField)`
`void` `setUseLongContentLength(boolean useLongContentLength)`
`void` `setUserAgentField(String userAgentField)`
`void` `setUserField(String userField)`
`void` `setVirtualHostField(String virtualHostField)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### useLongContentLength

    protected boolean useLongContentLength

### Constructor Detail

#### JDBCLogHandler

    @Deprecated
    public JDBCLogHandler(HttpHandler next,
                                      Executor logWriteExecutor,
                                      String formatString,
                                      DataSource dataSource)

Deprecated.

#### JDBCLogHandler

    public JDBCLogHandler(HttpHandler next,
                          String formatString,
                          DataSource dataSource)

### Method Detail

#### handleRequest

    public void handleRequest(HttpServerExchange exchange)
                       throws Exception

Description copied from interface: `HttpHandler`
Handle the request.

Specified by:
  `handleRequest` in interface `HttpHandler`
Parameters:
  `exchange` - the HTTP request/response exchange
Throws:
  `Exception`

#### logMessage

    public void logMessage(String pattern,
                           HttpServerExchange exchange)

#### run

    public void run()

insert the log record to database

Specified by:
  `run` in interface `Runnable`

#### isUseLongContentLength

    public boolean isUseLongContentLength()

#### setUseLongContentLength

    public void setUseLongContentLength(boolean useLongContentLength)

#### getTableName

    public String getTableName()

#### setTableName

    public void setTableName(String tableName)

#### getRemoteHostField

    public String getRemoteHostField()

#### setRemoteHostField

    public void setRemoteHostField(String remoteHostField)

#### getUserField

    public String getUserField()

#### setUserField

    public void setUserField(String userField)

#### getTimestampField

    public String getTimestampField()

#### setTimestampField

    public void setTimestampField(String timestampField)

#### getVirtualHostField

    public String getVirtualHostField()

#### setVirtualHostField

    public void setVirtualHostField(String virtualHostField)

#### getMethodField

    public String getMethodField()

#### setMethodField

    public void setMethodField(String methodField)

#### getQueryField

    public String getQueryField()

#### setQueryField

    public void setQueryField(String queryField)

#### getStatusField

    public String getStatusField()

#### setStatusField

    public void setStatusField(String statusField)

#### getBytesField

    public String getBytesField()

#### setBytesField

    public void setBytesField(String bytesField)

#### getRefererField

    public String getRefererField()

#### setRefererField

    public void setRefererField(String refererField)

#### getUserAgentField

    public String getUserAgentField()

#### setUserAgentField

    public void setUserAgentField(String userAgentField)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`