Interface NetworkConnectionInterceptor

All Known Implementing Classes:
AbstractNetworkConnectionInterceptor

public interface NetworkConnectionInterceptor
Implementations of this interface enable user-defined code to use the underlying network connection to perform network I/O, typically implementing an authentication protocol.
Since:
5.2
Author:
Laurent Cohen
  • Field Details

    • INTERCEPTORS

      static final List<NetworkConnectionInterceptor> INTERCEPTORS
      The list of interceptors loaded via SPI, possibly empty. This list is unmodifiable and any attempt to modify it will raise an UnsupportOperationException.
  • Method Details

    • onAccept

      default boolean onAccept(Socket acceptedSocket)
      Deprecated.
      Called when a Socket is accepted by a ServerSocket on the server side of a connection.
      Parameters:
      acceptedSocket - the socket that was just accepted.
      Returns:
      true to accept the connection false to deny it.
    • onAccept

      boolean onAccept(Socket acceptedSocket, JPPFChannelDescriptor descriptor)
      Called when a Socket is accepted by a ServerSocket on the server side of a connection.
      Parameters:
      acceptedSocket - the socket that was just accepted.
      descriptor - provides information on the accepted socket.
      Returns:
      true to accept the connection false to deny it.
      Since:
      6.3
    • onAccept

      default boolean onAccept(SocketChannel acceptedChannel)
      Called when a SocketChannel is accepted by a ServerSocketChannel on the server side of a connection.
      Parameters:
      acceptedChannel - the socket that was just accepted.
      Returns:
      true to accept the connection false to deny it.
    • onAccept

      boolean onAccept(SocketChannel acceptedChannel, JPPFChannelDescriptor descriptor)
      Called when a SocketChannel is accepted by a ServerSocketChannel on the server side of a connection.
      Parameters:
      acceptedChannel - the socket that was just accepted.
      descriptor - provides information on the accepted socket channel.
      Returns:
      true to accept the connection false to deny it.
      Since:
      6.3
    • onConnect

      default boolean onConnect(Socket connectedSocket)
      Called when a Socket is connected on the client side of a connection.
      Parameters:
      connectedSocket - the socket that just connected.
      Returns:
      true to accept the connection false to deny it.
    • onConnect

      boolean onConnect(Socket connectedSocket, JPPFChannelDescriptor descriptor)
      Called when a Socket is connected on the client side of a connection.
      Parameters:
      connectedSocket - the socket that just connected.
      descriptor - provides information on the connected socket.
      Returns:
      true to accept the connection false to deny it.
      Since:
      6.3
    • onConnect

      default boolean onConnect(SocketChannel connectedChannel)
      Called when a SocketChannel is connected on the client side of a connection.
      Parameters:
      connectedChannel - the channel that just connected.
      Returns:
      true to accept the connection false to deny it.
    • onConnect

      boolean onConnect(SocketChannel connectedChannel, JPPFChannelDescriptor descriptor)
      Called when a SocketChannel is connected on the client side of a connection.
      Parameters:
      connectedChannel - the channel that just connected.
      descriptor - provides information on the connected socket channel.
      Returns:
      true to accept the connection false to deny it.
      Since:
      6.3