org.eclipse.jetty.io
类 NetworkTrafficListener.Empty

java.lang.Object
  继承者 org.eclipse.jetty.io.NetworkTrafficListener.Empty
所有已实现的接口:
NetworkTrafficListener
正在封闭接口:
NetworkTrafficListener

public static class NetworkTrafficListener.Empty
extends Object
implements NetworkTrafficListener

A commodity class that implements NetworkTrafficListener with empty methods.


嵌套类摘要
 
从接口 org.eclipse.jetty.io.NetworkTrafficListener 继承的嵌套类/接口
NetworkTrafficListener.Empty
 
构造方法摘要
NetworkTrafficListener.Empty()
           
 
方法摘要
 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.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

NetworkTrafficListener.Empty

public NetworkTrafficListener.Empty()
方法详细信息

opened

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.

指定者:
接口 NetworkTrafficListener 中的 opened
参数:
socket - the socket associated with the remote client

incoming

public void incoming(Socket socket,
                     Buffer bytes)
从接口 NetworkTrafficListener 复制的描述

Callback method invoked when bytes sent by a remote client arrived on the server.

指定者:
接口 NetworkTrafficListener 中的 incoming
参数:
socket - the socket associated with the remote client
bytes - the read-only buffer containing the incoming bytes

outgoing

public 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.

指定者:
接口 NetworkTrafficListener 中的 outgoing
参数:
socket - the socket associated with the remote client
bytes - the read-only buffer containing the outgoing bytes

closed

public 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.

指定者:
接口 NetworkTrafficListener 中的 closed
参数:
socket - the (closed) socket associated with the remote client


Copyright © 2013. All Rights Reserved.