|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.model.MethodHandler
public abstract class MethodHandler
Resource method handler model.
| Constructor Summary | |
|---|---|
MethodHandler()
|
|
| Method Summary | |
|---|---|
void |
accept(ResourceModelVisitor visitor)
A component should call the visitor back with an appropriate visitor interface method to give it a chance to process. |
static MethodHandler |
create(Class<?> handlerClass)
Create a class-based method handler from a class. |
static MethodHandler |
create(Class<?> handlerClass,
boolean disableParamDecoding)
Create a class-based method handler from a class. |
static MethodHandler |
create(Object handlerInstance)
Create a instance-based (singleton) method handler from a class. |
static MethodHandler |
create(Object handlerInstance,
Class<?> handlerClass)
Create a instance-based (singleton) method handler from a class. |
List<? extends ResourceModelComponent> |
getComponents()
Should return all existing resource model sub-components. |
List<HandlerConstructor> |
getConstructors()
Get the resource method handler constructors. |
abstract Class<?> |
getHandlerClass()
Get the resource method handler class. |
protected abstract Object |
getHandlerInstance()
Get the raw handler instance that is backing this method handler. |
abstract Object |
getInstance(org.glassfish.hk2.api.ServiceLocator locator)
Get the injected resource method handler instance. |
abstract boolean |
isClassBased()
Return whether the method handler creates instances
based on classes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MethodHandler()
| Method Detail |
|---|
public static MethodHandler create(Class<?> handlerClass)
handlerClass - method handler class.
public static MethodHandler create(Class<?> handlerClass,
boolean disableParamDecoding)
handlerClass - method handler class.disableParamDecoding - if set to true, any injected constructor
parameters must be kept encoded and must not be automatically decoded.
public static MethodHandler create(Object handlerInstance)
handlerInstance - method handler instance (singleton).
public static MethodHandler create(Object handlerInstance,
Class<?> handlerClass)
handlerInstance - method handler instance (singleton).handlerClass - declared handler class.
public abstract Class<?> getHandlerClass()
public List<HandlerConstructor> getConstructors()
public abstract Object getInstance(org.glassfish.hk2.api.ServiceLocator locator)
locator - service locator that can be used to inject get the instance.
public abstract boolean isClassBased()
creates instances
based on classes.
classes given to HK2, false\
otherwise (for example when method handler was initialized from instance)public List<? extends ResourceModelComponent> getComponents()
ResourceModelComponent
getComponents in interface ResourceModelComponentpublic void accept(ResourceModelVisitor visitor)
ResourceModelComponent
accept in interface ResourceModelComponentvisitor - resource model visitor.protected abstract Object getHandlerInstance()
null if the handler is
class-based.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||