Package org.jppf.comm.interceptor
Class InterceptorHandler
java.lang.Object
org.jppf.comm.interceptor.InterceptorHandler
This class loads, and provides access to, the
NetworkConnectionInterceptors discovered via SPI.- Since:
- 5.2
- Author:
- Laurent Cohen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDetermine whether at least one interceptor was succesfully loaded.static booleaninvokeOnAccept(Socket acceptedSocket, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onAccept()method with the specified socket.static booleaninvokeOnAccept(SocketChannel acceptedChannel, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onAccept()method with the specified socket channel.static booleaninvokeOnAccept(SocketWrapper socketWrapper, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onAccept()method with the specified socket wrapper.static booleaninvokeOnConnect(Socket connectedSocket, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onConnect()method with the specified socket.static booleaninvokeOnConnect(SocketChannel connectedChannel, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onConnect()method with the specified socket channel.static booleaninvokeOnConnect(SocketWrapper socketWrapper, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onConnect()method with the specified socket wrapper.
-
Constructor Details
-
InterceptorHandler
public InterceptorHandler()
-
-
Method Details
-
hasInterceptor
public static boolean hasInterceptor()Determine whether at least one interceptor was succesfully loaded.- Returns:
trueif there is at least one interceptor,falseotherwise.
-
invokeOnConnect
public static boolean invokeOnConnect(Socket connectedSocket, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onConnect()method with the specified socket.- Parameters:
connectedSocket- the socket to intercept.channelDescriptor- provdes information on the connected channel.- Returns:
trueif allonConnect()invocations returnedtrue,falseotherwise.
-
invokeOnConnect
public static boolean invokeOnConnect(SocketChannel connectedChannel, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onConnect()method with the specified socket channel.- Parameters:
connectedChannel- the socket channel to intercept.channelDescriptor- provdes information on the connected channel.- Returns:
trueif allonConnect()invocations returnedtrue,falseotherwise.
-
invokeOnAccept
public static boolean invokeOnAccept(Socket acceptedSocket, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onAccept()method with the specified socket.- Parameters:
acceptedSocket- the socket to intercept.channelDescriptor- provdes information on the accepted channel.- Returns:
trueif allonAccept()invocations returnedtrue,falseotherwise.
-
invokeOnAccept
public static boolean invokeOnAccept(SocketChannel acceptedChannel, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onAccept()method with the specified socket channel.- Parameters:
acceptedChannel- the socket channel to intercept.channelDescriptor- provdes information on the accepted channel.- Returns:
trueif allonAccept()invocations returnedtrue,falseotherwise.
-
invokeOnConnect
public static boolean invokeOnConnect(SocketWrapper socketWrapper, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onConnect()method with the specified socket wrapper.- Parameters:
socketWrapper- holds the socket to intercept.channelDescriptor- provdes information on the connected channel.- Returns:
trueif allonConnect()invocations returnedtrue,falseotherwise.
-
invokeOnAccept
public static boolean invokeOnAccept(SocketWrapper socketWrapper, JPPFChannelDescriptor channelDescriptor) Invoke all interceptors'onAccept()method with the specified socket wrapper.- Parameters:
socketWrapper- holds the socket to intercept.channelDescriptor- provdes information on the accepted channel.- Returns:
trueif allonAccept()invocations returnedtrue,falseotherwise.
-