Package org.eclipse.jetty.server
Class SocketCustomizationListener
- java.lang.Object
-
- org.eclipse.jetty.server.SocketCustomizationListener
-
- All Implemented Interfaces:
Connection.Listener
public class SocketCustomizationListener extends java.lang.Object implements Connection.Listener
A Connection Lister for customization of SocketConnections.Instances of this listener may be added to a
Connector(orConnectionFactory) so that they are applied to all connections for that connector (or protocol) and thus allow additional Socket configuration to be applied by implementingcustomize(Socket, Class, boolean)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection.Listener
Connection.Listener.Adapter
-
-
Constructor Summary
Constructors Constructor Description SocketCustomizationListener()Construct with SSL unwrapping on.SocketCustomizationListener(boolean ssl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcustomize(java.net.Socket socket, java.lang.Class<? extends Connection> connection, boolean ssl)This method may be extended to configure a socket on open events.voidonClosed(Connection connection)voidonOpened(Connection connection)
-
-
-
Method Detail
-
onOpened
public void onOpened(Connection connection)
- Specified by:
onOpenedin interfaceConnection.Listener
-
customize
protected void customize(java.net.Socket socket, java.lang.Class<? extends Connection> connection, boolean ssl)This method may be extended to configure a socket on open events.- Parameters:
socket- The Socket to configureconnection- The class of the connection (The socket may be wrapped by anSslConnectionprior to this connection).ssl- True if the socket is wrapped with an SslConnection
-
onClosed
public void onClosed(Connection connection)
- Specified by:
onClosedin interfaceConnection.Listener
-
-