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 ObjectGet the raw handler instance that is backing this method handler.getInstance(InjectionManager injectionManager) Get the injected resource method handler instance.booleanReturn whether the method handlercreates instancesbased 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:MethodHandlerGet the resource method handler class.- Specified by:
getHandlerClassin classMethodHandler- Returns:
- resource method handler class.
-
getConstructors
Description copied from class:MethodHandlerGet 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:
getConstructorsin classMethodHandler- Returns:
- resource method handler constructors.
-
getInstance
Description copied from class:MethodHandlerGet the injected resource method handler instance.- Specified by:
getInstancein 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:MethodHandlerReturn whether the method handlercreates instancesbased onclasses.- Specified by:
isClassBasedin classMethodHandler- Returns:
- True is instances returned by this method handler are created from
classesgiven toInjectionManager, false otherwise (for example when method handler was initialized from instance)
-
getHandlerInstance
Description copied from class:MethodHandlerGet the raw handler instance that is backing this method handler.- Specified by:
getHandlerInstancein classMethodHandler- Returns:
- raw handler instance. May return
nullif the handler isclass-based.
-
getComponents
Description copied from interface:ResourceModelComponentShould return all existing resource model sub-components.- Specified by:
getComponentsin interfaceResourceModelComponent- Overrides:
getComponentsin classMethodHandler- Returns:
- list of all sub-components
-
toString
-