Class SocketCustomizationListener

java.lang.Object
org.eclipse.jetty.server.SocketCustomizationListener
All Implemented Interfaces:
EventListener, org.eclipse.jetty.io.Connection.Listener

public class SocketCustomizationListener extends Object implements org.eclipse.jetty.io.Connection.Listener
A Connection Lister for customization of SocketConnections.

Instances of this listener may be added to a Connector (or ConnectionFactory) so that they are applied to all connections for that connector (or protocol) and thus allow additional Socket configuration to be applied by implementing customize(Socket, Class, boolean)

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection.Listener

    org.eclipse.jetty.io.Connection.Listener.Adapter
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct with SSL unwrapping on.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    customize(Socket socket, Class<? extends org.eclipse.jetty.io.Connection> connection, boolean ssl)
    This method may be extended to configure a socket on open events.
    void
    onClosed(org.eclipse.jetty.io.Connection connection)
     
    void
    onOpened(org.eclipse.jetty.io.Connection connection)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SocketCustomizationListener

      public SocketCustomizationListener()
      Construct with SSL unwrapping on.
    • SocketCustomizationListener

      public SocketCustomizationListener(boolean ssl)
      Parameters:
      ssl - If True, then a Socket underlying an SSLConnection is unwrapped and notified.
  • Method Details

    • onOpened

      public void onOpened(org.eclipse.jetty.io.Connection connection)
      Specified by:
      onOpened in interface org.eclipse.jetty.io.Connection.Listener
    • customize

      protected void customize(Socket socket, Class<? extends org.eclipse.jetty.io.Connection> connection, boolean ssl)
      This method may be extended to configure a socket on open events.
      Parameters:
      socket - The Socket to configure
      connection - The class of the connection (The socket may be wrapped by an SslConnection prior to this connection).
      ssl - True if the socket is wrapped with an SslConnection
    • onClosed

      public void onClosed(org.eclipse.jetty.io.Connection connection)
      Specified by:
      onClosed in interface org.eclipse.jetty.io.Connection.Listener