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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClassBasedMethodHandler
(Class<?> handlerClass, boolean disableParamDecoding, Collection<Parameter> handlerParameters) ClassBasedMethodHandler
(Class<?> handlerClass, Collection<Parameter> handlerParameters) -
Method Summary
Modifier and TypeMethodDescriptionList<? extends ResourceModelComponent>
Should return all existing resource model sub-components.Get the resource method handler constructors.Class<?>
Get the resource method handler class.protected Object
Get the raw handler instance that is backing this method handler.getInstance
(InjectionManager injectionManager) Get the injected resource method handler instance.boolean
Return whether the method handlercreates instances
based onclasses
.toString()
-
Field Details
-
handlerClass
-
handlerConstructors
-
-
Constructor Details
-
ClassBasedMethodHandler
-
ClassBasedMethodHandler
public ClassBasedMethodHandler(Class<?> handlerClass, boolean disableParamDecoding, Collection<Parameter> handlerParameters)
-
-
Method Details
-
getHandlerClass
Description copied from class:MethodHandler
Get the resource method handler class.- Specified by:
getHandlerClass
in classMethodHandler
- Returns:
- resource method handler class.
-
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 classMethodHandler
- Returns:
- resource method handler constructors.
-
getInstance
Description copied from class:MethodHandler
Get the injected resource method handler instance.- Specified by:
getInstance
in classMethodHandler
- 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 handlercreates instances
based onclasses
.- Specified by:
isClassBased
in classMethodHandler
- Returns:
- True is instances returned by this method handler are created from
classes
given toInjectionManager
, false otherwise (for example when method handler was initialized from instance)
-
getHandlerInstance
Description copied from class:MethodHandler
Get the raw handler instance that is backing this method handler.- Specified by:
getHandlerInstance
in classMethodHandler
- Returns:
- raw handler instance. May return
null
if the handler isclass-based
.
-
getComponents
Description copied from interface:ResourceModelComponent
Should return all existing resource model sub-components.- Specified by:
getComponents
in interfaceResourceModelComponent
- Overrides:
getComponents
in classMethodHandler
- Returns:
- list of all sub-components
-
toString
-