Package org.jppf.comm.interceptor
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final List<NetworkConnectionInterceptor>The list of interceptors loaded via SPI, possibly empty. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDeprecated.booleanonAccept(Socket acceptedSocket, JPPFChannelDescriptor descriptor) Called when aSocketis accepted by aServerSocketon the server side of a connection.default booleanonAccept(SocketChannel acceptedChannel) Deprecated.useonAccept(SocketChannel, JPPFChannelDescriptor)instead.booleanonAccept(SocketChannel acceptedChannel, JPPFChannelDescriptor descriptor) Called when aSocketChannelis accepted by aServerSocketChannelon the server side of a connection.default booleanDeprecated.useonConnect(Socket, JPPFChannelDescriptor)instead.booleanonConnect(Socket connectedSocket, JPPFChannelDescriptor descriptor) Called when aSocketis connected on the client side of a connection.default booleanonConnect(SocketChannel connectedChannel) Deprecated.useonConnect(SocketChannel, JPPFChannelDescriptor)instead.booleanonConnect(SocketChannel connectedChannel, JPPFChannelDescriptor descriptor) Called when aSocketChannelis connected on the client side of a connection.
-
Field Details
-
INTERCEPTORS
The list of interceptors loaded via SPI, possibly empty. This list is unmodifiable and any attempt to modify it will raise anUnsupportOperationException.
-
-
Method Details
-
onAccept
Deprecated.useonAccept(Socket, JPPFChannelDescriptor)instead.Called when aSocketis accepted by aServerSocketon the server side of a connection.- Parameters:
acceptedSocket- the socket that was just accepted.- Returns:
trueto accept the connectionfalseto deny it.
-
onAccept
Called when aSocketis accepted by aServerSocketon the server side of a connection.- Parameters:
acceptedSocket- the socket that was just accepted.descriptor- provides information on the accepted socket.- Returns:
trueto accept the connectionfalseto deny it.- Since:
- 6.3
-
onAccept
Deprecated.useonAccept(SocketChannel, JPPFChannelDescriptor)instead.Called when aSocketChannelis accepted by aServerSocketChannelon the server side of a connection.- Parameters:
acceptedChannel- the socket that was just accepted.- Returns:
trueto accept the connectionfalseto deny it.
-
onAccept
Called when aSocketChannelis accepted by aServerSocketChannelon the server side of a connection.- Parameters:
acceptedChannel- the socket that was just accepted.descriptor- provides information on the accepted socket channel.- Returns:
trueto accept the connectionfalseto deny it.- Since:
- 6.3
-
onConnect
Deprecated.useonConnect(Socket, JPPFChannelDescriptor)instead.Called when aSocketis connected on the client side of a connection.- Parameters:
connectedSocket- the socket that just connected.- Returns:
trueto accept the connectionfalseto deny it.
-
onConnect
Called when aSocketis connected on the client side of a connection.- Parameters:
connectedSocket- the socket that just connected.descriptor- provides information on the connected socket.- Returns:
trueto accept the connectionfalseto deny it.- Since:
- 6.3
-
onConnect
Deprecated.useonConnect(SocketChannel, JPPFChannelDescriptor)instead.Called when aSocketChannelis connected on the client side of a connection.- Parameters:
connectedChannel- the channel that just connected.- Returns:
trueto accept the connectionfalseto deny it.
-
onConnect
Called when aSocketChannelis connected on the client side of a connection.- Parameters:
connectedChannel- the channel that just connected.descriptor- provides information on the connected socket channel.- Returns:
trueto accept the connectionfalseto deny it.- Since:
- 6.3
-
onAccept(Socket, JPPFChannelDescriptor)instead.