org.glassfish.grizzly
Interface ConnectionProbe

All Known Implementing Classes:
ConnectionProbe.Adapter

public interface ConnectionProbe

Monitoring probe providing callbacks that may be invoked by Grizzly Connection implementations.

Since:
2.0
Author:
Alexey Stashok

Nested Class Summary
static class ConnectionProbe.Adapter
          ConnectionProbe adapter that provides no-op implementations for all interface methods allowing easy extension by the developer.
 
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.
 

Method Detail

onBindEvent

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

Parameters:
connection - Connection, the event belongs to.

onAcceptEvent

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

Parameters:
serverConnection - server Connection, the event belongs to.
clientConnection - new client Connection.

onConnectEvent

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

Parameters:
connection - Connection, the event belongs to.

onReadEvent

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

Parameters:
connection - Connection, the event belongs to.
data - Buffer, where the data gets read.
size - the data size.

onWriteEvent

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

Parameters:
connection - Connection, the event belongs to.
data - Buffer, where the data gets writen.
size - the data size.

onErrorEvent

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

Parameters:
connection - Connection, the event belongs to.
error - error

onCloseEvent

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

Parameters:
connection - Connection, the event belongs to.

onIOEventReadyEvent

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

Parameters:
connection - Connection, the event belongs to.
ioEvent - IOEvent.

onIOEventEnableEvent

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

Parameters:
connection - Connection, the event belongs to.
ioEvent - IOEvent.

onIOEventDisableEvent

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

Parameters:
connection - Connection, the event belongs to.
ioEvent - IOEvent.


Copyright © 2012 Oracle Corporation. All Rights Reserved.