org.glassfish.grizzly.http
Class KeepAliveProbe.Adapter

java.lang.Object
  extended by org.glassfish.grizzly.http.KeepAliveProbe.Adapter
All Implemented Interfaces:
KeepAliveProbe
Enclosing interface:
KeepAliveProbe

public static class KeepAliveProbe.Adapter
extends Object
implements KeepAliveProbe

KeepAliveProbe adapter that provides no-op implementations for all interface methods allowing easy extension by the developer.

Since:
2.1.9

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.glassfish.grizzly.http.KeepAliveProbe
KeepAliveProbe.Adapter
 
Constructor Summary
KeepAliveProbe.Adapter()
           
 
Method Summary
 void onConnectionAcceptEvent(Connection connection)
          Method will be called, when new keep-alive HTTP connection is getting established.
 void onHitEvent(Connection connection, int requestNumber)
          Method will be called, when HTTP request comes on a kept alive connection.
 void onRefuseEvent(Connection connection)
          Method will be called, when the Connection could be used in the keep alive mode, but due to KeepAlive config limitations it will be closed.
 void onTimeoutEvent(Connection connection)
          Method will be called, when the keep alive Connection idle timeout expired.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepAliveProbe.Adapter

public KeepAliveProbe.Adapter()
Method Detail

onConnectionAcceptEvent

public void onConnectionAcceptEvent(Connection connection)
Method will be called, when new keep-alive HTTP connection is getting established. This method is getting invoked, when 1st HTTP request processing completes, but the Connection will be kept alive to process next HTTP request.

Specified by:
onConnectionAcceptEvent in interface KeepAliveProbe
Parameters:
connection - Connection, the event belongs to.

onHitEvent

public void onHitEvent(Connection connection,
                       int requestNumber)
Method will be called, when HTTP request comes on a kept alive connection.

Specified by:
onHitEvent in interface KeepAliveProbe
Parameters:
connection - Connection, the event belongs to.
requestNumber - HTTP request number, being processed on the given keep-alive connection.

onRefuseEvent

public void onRefuseEvent(Connection connection)
Method will be called, when the Connection could be used in the keep alive mode, but due to KeepAlive config limitations it will be closed.

Specified by:
onRefuseEvent in interface KeepAliveProbe
Parameters:
connection - Connection, the event belongs to.

onTimeoutEvent

public void onTimeoutEvent(Connection connection)
Method will be called, when the keep alive Connection idle timeout expired.

Specified by:
onTimeoutEvent in interface KeepAliveProbe
Parameters:
connection - Connection, the event belongs to.


Copyright © 2012 Oracle Corporation. All Rights Reserved.