public final class KeepAlive extends Object implements MonitoringAware<KeepAliveProbe>
Modifier and Type | Field and Description |
---|---|
protected DefaultMonitoringConfig<KeepAliveProbe> |
monitoringConfig
Keep alive probes
|
Constructor and Description |
---|
KeepAlive() |
KeepAlive(KeepAlive keepAlive)
The copy constructor.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
createJmxManagementObject() |
int |
getIdleTimeoutInSeconds() |
int |
getMaxRequestsCount() |
MonitoringConfig<KeepAliveProbe> |
getMonitoringConfig()
Return the object associated
MonitoringConfig . |
protected static void |
notifyProbesConnectionAccepted(KeepAlive keepAlive,
Connection connection)
Notify registered
KeepAliveProbe s about the "keep-alive connection accepted" event. |
protected static void |
notifyProbesHit(KeepAlive keepAlive,
Connection connection,
int requestNumber)
Notify registered
KeepAliveProbe s about the "keep-alive connection hit" event. |
protected static void |
notifyProbesRefused(KeepAlive keepAlive,
Connection connection)
Notify registered
KeepAliveProbe s about the "keep-alive connection refused" event. |
protected static void |
notifyProbesTimeout(KeepAlive keepAlive,
Connection connection)
Notify registered
KeepAliveProbe s about the "keep-alive connection timeout" event. |
void |
setIdleTimeoutInSeconds(int idleTimeoutInSeconds)
Configures idle connection timeout behavior.
|
void |
setMaxRequestsCount(int maxRequestsCount)
Configures the max number of HTTP requests allowed to be processed on one keep-alive connection.
|
protected final DefaultMonitoringConfig<KeepAliveProbe> monitoringConfig
public KeepAlive()
public KeepAlive(KeepAlive keepAlive)
keepAlive
- public int getIdleTimeoutInSeconds()
public void setIdleTimeoutInSeconds(int idleTimeoutInSeconds)
Configures idle connection timeout behavior.
idleTimeoutInSeconds
- the number in seconds a connection may
be idle before being timed out. Values less than zero are considered as FOREVER.public int getMaxRequestsCount()
public void setMaxRequestsCount(int maxRequestsCount)
Configures the max number of HTTP requests allowed to be processed on one keep-alive connection.
maxRequestsCount
- the max number of HTTP requests allowed to be
processed on one keep-alive connection. Values less than zero are considered as UNLIMITED.public MonitoringConfig<KeepAliveProbe> getMonitoringConfig()
MonitoringConfig
.getMonitoringConfig
in interface MonitoringAware<KeepAliveProbe>
MonitoringConfig
.protected Object createJmxManagementObject()
protected static void notifyProbesConnectionAccepted(KeepAlive keepAlive, Connection connection)
KeepAliveProbe
s about the "keep-alive connection accepted" event.keepAlive
- the KeepAlive event occurred on.connection
- Connection
been accepted.protected static void notifyProbesHit(KeepAlive keepAlive, Connection connection, int requestNumber)
KeepAliveProbe
s about the "keep-alive connection hit" event.keepAlive
- the KeepAlive event occurred on.connection
- Connection
been hit.requestNumber
- the request number being processed on the given Connection
.protected static void notifyProbesRefused(KeepAlive keepAlive, Connection connection)
KeepAliveProbe
s about the "keep-alive connection refused" event.keepAlive
- the KeepAlive event occurred on.connection
- Connection
been refused.protected static void notifyProbesTimeout(KeepAlive keepAlive, Connection connection)
KeepAliveProbe
s about the "keep-alive connection timeout" event.keepAlive
- the KeepAlive event occurred on.connection
- Connection
been timeout.Copyright © 2015 Oracle Corporation. All rights reserved.