Class MethodHandler.ClassBasedMethodHandler

java.lang.Object
org.glassfish.jersey.server.model.MethodHandler
org.glassfish.jersey.server.model.MethodHandler.ClassBasedMethodHandler
All Implemented Interfaces:
ResourceModelComponent
Enclosing class:
MethodHandler

private static class MethodHandler.ClassBasedMethodHandler extends MethodHandler
  • Field Details

  • Constructor Details

    • ClassBasedMethodHandler

      public ClassBasedMethodHandler(Class<?> handlerClass, Collection<Parameter> handlerParameters)
    • ClassBasedMethodHandler

      public ClassBasedMethodHandler(Class<?> handlerClass, boolean disableParamDecoding, Collection<Parameter> handlerParameters)
  • Method Details

    • getHandlerClass

      public Class<?> getHandlerClass()
      Description copied from class: MethodHandler
      Get the resource method handler class.
      Specified by:
      getHandlerClass in class MethodHandler
      Returns:
      resource method handler class.
    • getConstructors

      public List<HandlerConstructor> getConstructors()
      Description copied from class: MethodHandler
      Get the resource method handler constructors.

      The returned is empty by default. Concrete implementations may override the method to return the actual list of constructors that will be used for the handler initialization.

      Overrides:
      getConstructors in class MethodHandler
      Returns:
      resource method handler constructors.
    • getInstance

      public Object getInstance(InjectionManager injectionManager)
      Description copied from class: MethodHandler
      Get the injected resource method handler instance.
      Specified by:
      getInstance in class MethodHandler
      Parameters:
      injectionManager - injection manager that can be used to inject get the instance.
      Returns:
      injected resource method handler instance.
    • isClassBased

      public boolean isClassBased()
      Description copied from class: MethodHandler
      Return whether the method handler creates instances based on classes.
      Specified by:
      isClassBased in class MethodHandler
      Returns:
      True is instances returned by this method handler are created from classes given to InjectionManager, false otherwise (for example when method handler was initialized from instance)
    • getHandlerInstance

      protected Object getHandlerInstance()
      Description copied from class: MethodHandler
      Get the raw handler instance that is backing this method handler.
      Specified by:
      getHandlerInstance in class MethodHandler
      Returns:
      raw handler instance. May return null if the handler is class-based.
    • getComponents

      public List<? extends ResourceModelComponent> getComponents()
      Description copied from interface: ResourceModelComponent
      Should return all existing resource model sub-components.
      Specified by:
      getComponents in interface ResourceModelComponent
      Overrides:
      getComponents in class MethodHandler
      Returns:
      list of all sub-components
    • toString

      public String toString()
      Overrides:
      toString in class Object