org.glassfish.grizzly
Class ConnectionProbe.Adapter

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

public static class ConnectionProbe.Adapter
extends java.lang.Object
implements ConnectionProbe

ConnectionProbe 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.ConnectionProbe
ConnectionProbe.Adapter
 
Constructor Summary
ConnectionProbe.Adapter()
           
 
Method Summary
 void onAcceptEvent(Connection serverConnection, Connection clientConnection)
          Method will be called, when server side connection gets accepted.
 void onBindEvent(Connection connection)
          Method will be called, when server side connection gets bound.
 void onCloseEvent(Connection connection)
          Method will be called, when Connection gets closed.
 void onConnectEvent(Connection connection)
          Method will be called, when client side connection gets connected (opened).
 void onErrorEvent(Connection connection, java.lang.Throwable error)
          Method will be called, when error occurs on the Connection.
 void onIOEventDisableEvent(Connection connection, IOEvent ioEvent)
          Method will be called, when IOEvent for the specific Connection gets disabled.
 void onIOEventEnableEvent(Connection connection, IOEvent ioEvent)
          Method will be called, when IOEvent for the specific Connection gets enabled.
 void onIOEventReadyEvent(Connection connection, IOEvent ioEvent)
          Method will be called, when IOEvent for the specific Connection gets ready.
 void onReadEvent(Connection connection, Buffer data, int size)
          Method will be called, when the Connection has read data.
 void onWriteEvent(Connection connection, Buffer data, long size)
          Method will be called, when the Connection has written data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConnectionProbe.Adapter

public ConnectionProbe.Adapter()
Method Detail

onBindEvent

public void onBindEvent(Connection connection)
Method will be called, when server side connection gets bound.

Specified by:
onBindEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.

onAcceptEvent

public void onAcceptEvent(Connection serverConnection,
                          Connection clientConnection)
Method will be called, when server side connection gets accepted.

Specified by:
onAcceptEvent in interface ConnectionProbe
Parameters:
serverConnection - server Connection, the event belongs to.
clientConnection - new client Connection.

onConnectEvent

public void onConnectEvent(Connection connection)
Method will be called, when client side connection gets connected (opened).

Specified by:
onConnectEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.

onReadEvent

public void onReadEvent(Connection connection,
                        Buffer data,
                        int size)
Method will be called, when the Connection has read data.

Specified by:
onReadEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.
data - Buffer, where the data gets read.
size - the data size.

onWriteEvent

public void onWriteEvent(Connection connection,
                         Buffer data,
                         long size)
Method will be called, when the Connection has written data.

Specified by:
onWriteEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.
data - Buffer, where the data gets writen.
size - the data size.

onErrorEvent

public void onErrorEvent(Connection connection,
                         java.lang.Throwable error)
Method will be called, when error occurs on the Connection.

Specified by:
onErrorEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.
error - error

onCloseEvent

public void onCloseEvent(Connection connection)
Method will be called, when Connection gets closed.

Specified by:
onCloseEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.

onIOEventReadyEvent

public void onIOEventReadyEvent(Connection connection,
                                IOEvent ioEvent)
Method will be called, when IOEvent for the specific Connection gets ready.

Specified by:
onIOEventReadyEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.
ioEvent - IOEvent.

onIOEventEnableEvent

public void onIOEventEnableEvent(Connection connection,
                                 IOEvent ioEvent)
Method will be called, when IOEvent for the specific Connection gets enabled.

Specified by:
onIOEventEnableEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.
ioEvent - IOEvent.

onIOEventDisableEvent

public void onIOEventDisableEvent(Connection connection,
                                  IOEvent ioEvent)
Method will be called, when IOEvent for the specific Connection gets disabled.

Specified by:
onIOEventDisableEvent in interface ConnectionProbe
Parameters:
connection - Connection, the event belongs to.
ioEvent - IOEvent.


Copyright © 2012 Oracle Corporation. All Rights Reserved.