Skip to content

Create and deploy service interceptors

This topic discusses the process of developing service interceptors.

The following are the key steps for creating and deploying a service interceptor:

  1. Create a new interceptor project

    On your development machine (with the ArcGIS Enterprise SDK installed), create a new Java project using an IDE of your choice. You must ensure you have installed the appropriate Maven archetypes after installing the ArcGIS Enterprise SDK.

  2. Configure the @Interceptor annotation

    Update the @Interceptor annotation with appropriate values:

    • Set a meaningful displayName and description

    • Specify the urlPatterns to define which services should be intercepted

    • Add optional properties to control runtime behavior

  3. Implement interception logic

    In the intercept() method:

    • Add request interception logic before the line filterChain.intercept(request, response);

    • Add response interception logic after the previous line

    You may include additional helper classes or utilities to support complex logic.

  4. Package the project

    Build the project and package the compiled code into a .interceptor file using your IDE or Maven.

  5. Deploy the interceptor

    Register the .interceptor file with ArcGIS Server using the ArcGIS Server Admin API. Once registered, the interceptor becomes active and begins intercepting requests that match the specified URL patterns. For more information, see Quick tour of service interceptors.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.