Interface IServerServicesInterceptor


public interface IServerServicesInterceptor
The IServerServicesInterceptor interface defines the contract for implementing interceptors that can process and manipulate HTTP requests and responses within the ArcGIS Enterprise server services framework.

Implementations of this interface can perform custom logic before, after, or instead of the normal processing of server service requests. Interceptors can be used for tasks such as authentication, logging, auditing, request/response modification, and more.

Typical usage includes:

  • Initializing the interceptor with configuration, helper, and logger objects
  • Intercepting and processing HTTP requests and responses via the intercept method
  • Performing cleanup operations at the end of the interceptor's lifecycle
  • Method Details

    • init

      void init(IInterceptorConfig interceptorConfig, IServerServicesInterceptorHelper interceptorHelper, IServerInterceptorLogger logger)
      Initialize the interceptor
      Parameters:
      interceptorConfig - interceptor configuration.
      interceptorHelper - interceptor helper.
      logger - interceptor logger.
    • intercept

      void intercept(IInterceptorRequest request, IInterceptorResponse response, IServerServicesInterceptorChain interceptorChain) throws IOException, jakarta.servlet.ServletException
      Intercept the request
      Parameters:
      request - the request to pass along the chain.
      response - the response to pass along the chain.
      interceptorChain - the chain object to pass the request along the chain.
      Throws:
      IOException - if an I/O error occurs during the processing of the request
      jakarta.servlet.ServletException - if the processing fails for any other reason
    • cleanup

      void cleanup()
      Perform any cleanup required by the interceptor at the end of its lifecycle