Interface TransportConnectorPolicy


public interface TransportConnectorPolicy
An admission policy a transport server applies to each accepted socket.

When a TransportConnector is configured with a TransportConnectorPolicy, the process method is invoked with each accepted Socket before any protocol negotiation, connection counting or transport setup.

Implementations may inspect the socket and its remote address and throw a SecurityException to refuse it. The server closes a refused socket without writing anything to it and continues accepting.

Implementations must be thread safe: sockets from all acceptor threads of a server pass through a single instance. An implementation may also delegate to other policies, so several checks can run against one connector in order.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    process(Socket socket)
     
  • Method Details