|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jetty.io.NetworkTrafficListener.Empty
public static class NetworkTrafficListener.Empty
A commodity class that implements NetworkTrafficListener
with empty methods.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.NetworkTrafficListener |
---|
NetworkTrafficListener.Empty |
Constructor Summary | |
---|---|
NetworkTrafficListener.Empty()
|
Method Summary | |
---|---|
void |
closed(Socket socket)
Callback method invoked when a connection to a remote client has been closed. |
void |
incoming(Socket socket,
Buffer bytes)
Callback method invoked when bytes sent by a remote client arrived on the server. |
void |
opened(Socket socket)
Callback method invoked when a connection from a remote client has been accepted. |
void |
outgoing(Socket socket,
Buffer bytes)
Callback method invoked when bytes are sent to a remote client from the server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetworkTrafficListener.Empty()
Method Detail |
---|
public void opened(Socket socket)
NetworkTrafficListener
Callback method invoked when a connection from a remote client has been accepted.
The socket
parameter can be used to extract socket address information of
the remote client.
opened
in interface NetworkTrafficListener
socket
- the socket associated with the remote clientpublic void incoming(Socket socket, Buffer bytes)
NetworkTrafficListener
Callback method invoked when bytes sent by a remote client arrived on the server.
incoming
in interface NetworkTrafficListener
socket
- the socket associated with the remote clientbytes
- the read-only buffer containing the incoming bytespublic void outgoing(Socket socket, Buffer bytes)
NetworkTrafficListener
Callback method invoked when bytes are sent to a remote client from the server.
This method is invoked after the bytes have been actually written to the remote client.
outgoing
in interface NetworkTrafficListener
socket
- the socket associated with the remote clientbytes
- the read-only buffer containing the outgoing bytespublic void closed(Socket socket)
NetworkTrafficListener
Callback method invoked when a connection to a remote client has been closed.
The socket
parameter is already closed when this method is called, so it
cannot be queried for socket address information of the remote client.
However, the socket
parameter is the same object passed to NetworkTrafficListener.opened(Socket)
,
so it is possible to map socket information in NetworkTrafficListener.opened(Socket)
and retrieve it
in this method.
closed
in interface NetworkTrafficListener
socket
- the (closed) socket associated with the remote client
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |