Class DefaultHandler

java.lang.Object
ee.jakarta.tck.ws.rs.common.webclient.handler.DefaultHandler
All Implemented Interfaces:
Handler

public class DefaultHandler extends Object implements Handler
 The default handler will handle any
 header that doesn't have a configured handler.
 
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    areHeadersEqual(org.apache.commons.httpclient.Header h1, org.apache.commons.httpclient.Header h2)
    Utility method to determine equality of two Header objects
    static Handler
    Returns an instance of this handler.
    boolean
    invoke(org.apache.commons.httpclient.Header configuredHeader, org.apache.commons.httpclient.Header responseHeader)
    Invokes handler logic.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static Handler getInstance()
      Returns an instance of this handler.
    • invoke

      public boolean invoke(org.apache.commons.httpclient.Header configuredHeader, org.apache.commons.httpclient.Header responseHeader)
      Invokes handler logic.
      Specified by:
      invoke in interface Handler
      Parameters:
      configuredHeader - the user configured header
      responseHeader - the response header from the server
      Returns:
      True if the passed match, otherwise false
    • areHeadersEqual

      protected boolean areHeadersEqual(org.apache.commons.httpclient.Header h1, org.apache.commons.httpclient.Header h2)
      Utility method to determine equality of two Header objects
      Parameters:
      h1 - first header
      h2 - second header
      Returns:
      true if the headers are equal, otherwise false