The interceptor is allowed to throw an Exception to stop the request going further. Specifically it allows you to throw a HttpInterceptorException, which allows you to set both the http response code and message.
e.g.
throw new HttpInterceptorException(“Sorry, this server is temporarily unavailable”, 503);
I would recommend providing a public service to allow your interceptor to then decide to go into maintenance mode so that you don’t have to register/unregister it each time you want to use it, nor have to restart the server.
If you package your interceptor in a small package (recommended), you can place the jar in the packages code/jars/static folder. You could even develop a user friendly home page (dsp) to allow the administrator to activate/deactivate the interceptor and even customise the message.
John.
#Integration-Server-and-ESB#webMethods