NetworkTrafficListener.Empty (Jetty :: Aggregate :: All core Jetty 7.6.8.v20121106 API)
Date: 2012-11-06

org.eclipse.jetty.io

## Class NetworkTrafficListener.Empty

- java.lang.Object
- - org.eclipse.jetty.io.NetworkTrafficListener.Empty

- All Implemented Interfaces:
    NetworkTrafficListener
  Enclosing interface:
    NetworkTrafficListener

      public static class NetworkTrafficListener.Empty
      extends Object
      implements NetworkTrafficListener

  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

    Constructors
    Constructor and Description
    `NetworkTrafficListener.Empty()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### NetworkTrafficListener.Empty

          public NetworkTrafficListener.Empty()

  - ### Method Detail

    - #### opened

          public void opened(Socket socket)

      Description copied from interface: `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.

      Specified by:
        `opened` in interface `NetworkTrafficListener`
      Parameters:
        `socket` - the socket associated with the remote client

    - #### incoming

          public void incoming(Socket socket,
                      Buffer bytes)

      Description copied from interface: `NetworkTrafficListener`

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

      Specified by:
        `incoming` in interface `NetworkTrafficListener`
      Parameters:
        `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)

      Description copied from interface: `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.

      Specified by:
        `outgoing` in interface `NetworkTrafficListener`
      Parameters:
        `socket` - the socket associated with the remote client
        `bytes` - the read-only buffer containing the outgoing bytes

    - #### closed

          public void closed(Socket socket)

      Description copied from interface: `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.

      Specified by:
        `closed` in interface `NetworkTrafficListener`
      Parameters:
        `socket` - the (closed) socket associated with the remote client

Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.