|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface NetworkTrafficListener
A listener for raw network traffic within Jetty.
NetworkTrafficListeners can be installed in a
org.eclipse.jetty.server.nio.NetworkTrafficSelectChannelConnector,
and are notified of the following network traffic events:
NetworkTrafficListeners can be used to log the network traffic viewed by
a Jetty server (for example logging to filesystem) for activities such as debugging
or request/response cycles or for replaying request/response cycles to other servers.
| 嵌套类摘要 | |
|---|---|
static class |
NetworkTrafficListener.Empty
A commodity class that implements NetworkTrafficListener with empty methods. |
| 方法摘要 | |
|---|---|
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. |
| 方法详细信息 |
|---|
void opened(Socket socket)
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.
socket - the socket associated with the remote client
void incoming(Socket socket,
Buffer bytes)
Callback method invoked when bytes sent by a remote client arrived on the server.
socket - the socket associated with the remote clientbytes - the read-only buffer containing the incoming bytes
void outgoing(Socket socket,
Buffer bytes)
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.
socket - the socket associated with the remote clientbytes - the read-only buffer containing the outgoing bytesvoid closed(Socket socket)
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 opened(Socket),
so it is possible to map socket information in opened(Socket) and retrieve it
in this method.
socket - the (closed) socket associated with the remote client
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||