Class PermanentFailureFilter

java.lang.Object
org.openremote.container.web.PermanentFailureFilter
All Implemented Interfaces:
javax.ws.rs.client.ClientRequestFilter, javax.ws.rs.client.ClientResponseFilter

public class PermanentFailureFilter extends Object implements javax.ws.rs.client.ClientRequestFilter, javax.ws.rs.client.ClientResponseFilter
A filter that once a HTTP status code is received that matches any in the failureResponses will result in all future requests being blocked (i.e. the request will not reach the server) and instead a Response.Status.METHOD_NOT_ALLOWED status will be returned.
  • Field Details

    • failed

      protected boolean failed
    • failureResponses

      protected List<Integer> failureResponses
  • Constructor Details

    • PermanentFailureFilter

      public PermanentFailureFilter(List<Integer> failureResponses)
  • Method Details

    • filter

      public void filter(javax.ws.rs.client.ClientRequestContext requestContext) throws IOException
      Specified by:
      filter in interface javax.ws.rs.client.ClientRequestFilter
      Throws:
      IOException
    • filter

      public void filter(javax.ws.rs.client.ClientRequestContext requestContext, javax.ws.rs.client.ClientResponseContext responseContext) throws IOException
      Specified by:
      filter in interface javax.ws.rs.client.ClientResponseFilter
      Throws:
      IOException