Class InterceptorHandler

java.lang.Object
org.jppf.comm.interceptor.InterceptorHandler

public class InterceptorHandler extends Object
This class loads, and provides access to, the NetworkConnectionInterceptors discovered via SPI.
Since:
5.2
Author:
Laurent Cohen
  • Constructor Details

    • InterceptorHandler

      public InterceptorHandler()
  • Method Details

    • hasInterceptor

      public static boolean hasInterceptor()
      Determine whether at least one interceptor was succesfully loaded.
      Returns:
      true if there is at least one interceptor, false otherwise.
    • 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:
      true if all onConnect() invocations returned true, false otherwise.
    • 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:
      true if all onConnect() invocations returned true, false otherwise.
    • 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:
      true if all onAccept() invocations returned true, false otherwise.
    • 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:
      true if all onAccept() invocations returned true, false otherwise.
    • 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:
      true if all onConnect() invocations returned true, false otherwise.
    • 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:
      true if all onAccept() invocations returned true, false otherwise.