Class InterceptorCfg

java.lang.Object
io.camunda.zeebe.gateway.impl.configuration.InterceptorCfg

public final class InterceptorCfg extends Object
Configuration to load a single extra interceptor. The className property is required, and must be a fully qualified name referring to an implementation of ServerInterceptor.

Optionally, a jarPath can be supplied, and the class will be looked up there. Note that the JAR is loaded within an isolated class loader to avoid dependency conflicts, so you must make sure that all dependencies are available in the JAR, or via the gateway itself.

  • Constructor Details

    • InterceptorCfg

      public InterceptorCfg()
  • Method Details

    • isExternal

      public boolean isExternal()
      Returns:
      true if the class must be loaded from an external JAR, false otherwise
    • getId

      public String getId()
      Returns a human readable identifier, mostly for debugging purposes to differentiate instances of the same interceptor, for example. If not specified, defaults to the className.
      Returns:
      a human readable identifier, mostly for debugging purposes
    • setId

      public void setId(String id)
      Parameters:
      id - the interceptor's new debug identifier
    • getJarPath

      public String getJarPath()
      Returns the path to the JAR file containing the interceptor implementation. Note that this may be null, as this field is optional. If it is null, then the implementation is looked up within the base class path.

      NOTE: the path may be relative or absolute. The caller must be handle both cases.

      Returns:
      a path to the JAR, or null
    • setJarPath

      public void setJarPath(String jarPath)
      Sets the path to the interceptor JAR. Can be null if the interceptor implementation class can be found on the class path.
      Parameters:
      jarPath - the new JAR path, or null
    • getClassName

      public String getClassName()
      Returns:
      the fully qualified class name of the interceptor implementation
    • setClassName

      public void setClassName(String className)
      Sets a new class name. Note that this must be a fully qualified class name to avoid any collisions.
      Parameters:
      className - the new class name
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object