Package org.jppf.comm.interceptor
Class AbstractNetworkConnectionInterceptor
java.lang.Object
org.jppf.comm.interceptor.AbstractNetworkConnectionInterceptor
- All Implemented Interfaces:
NetworkConnectionInterceptor
public abstract class AbstractNetworkConnectionInterceptor
extends Object
implements NetworkConnectionInterceptor
An abstract interceptor implementation which creates or obtains streams from the Socket or SocketChannel
passed on to its methods.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from interface org.jppf.comm.interceptor.NetworkConnectionInterceptor
INTERCEPTORS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanonAccept(SocketChannel acceptedChannel, JPPFChannelDescriptor descriptor) Called when aSocketChannelis accepted by aServerSocketChannelon the server side of a connection.booleanonConnect(SocketChannel connectedChannel, JPPFChannelDescriptor descriptor) Called when aSocketChannelis connected on the client side of a connection.
-
Constructor Details
-
AbstractNetworkConnectionInterceptor
public AbstractNetworkConnectionInterceptor()
-
-
Method Details
-
onAccept
Description copied from interface:NetworkConnectionInterceptorCalled when aSocketChannelis accepted by aServerSocketChannelon the server side of a connection.- Specified by:
onAcceptin interfaceNetworkConnectionInterceptor- Parameters:
acceptedChannel- the socket that was just accepted.descriptor- provides information on the accepted socket channel.- Returns:
trueto accept the connectionfalseto deny it.
-
onConnect
Description copied from interface:NetworkConnectionInterceptorCalled when aSocketChannelis connected on the client side of a connection.- Specified by:
onConnectin interfaceNetworkConnectionInterceptor- Parameters:
connectedChannel- the channel that just connected.descriptor- provides information on the connected socket channel.- Returns:
trueto accept the connectionfalseto deny it.
-