|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.model.Invocable
public final class Invocable
A common interface for invocable resource components. This includes resource methods, sub-resource methods and sub-resource locators bound to a concrete handler class and a Java method (either directly or indirectly) declared & implemented by the handler class.
Invocable component information is used at runtime by a Java method dispatcher when processing requests.
ResourceMethod,
ResourceMethodDispatcher| 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 Invocable |
create(java.lang.Class<? extends Inflector> inflectorClass)
Create a new resource method invocable model backed by an inflector class. |
|
static
|
create(Inflector<Request,T> inflector)
Create a new resource method invocable model backed by an inflector instance. |
|
static Invocable |
create(MethodHandler handler,
java.lang.reflect.Method handlingMethod)
Create a new resource method invocable model. |
|
static Invocable |
create(MethodHandler handler,
java.lang.reflect.Method handlingMethod,
boolean encodedParameters)
Create a new resource method invocable model. |
|
java.util.List<? extends ResourceModelComponent> |
getComponents()
Should return all existing resource model sub-components. |
|
MethodHandler |
getHandler()
Get the model of the resource method handler that will be used to invoke the handling resource method on. |
|
java.lang.reflect.Method |
getHandlingMethod()
Getter for the Java method |
|
java.util.List<Parameter> |
getParameters()
Provides access to all parameters associated with given Parameterized instance. |
|
GenericType<?> |
getResponseType()
Get the resource method response type. |
|
boolean |
isInflector()
Check if the invocable represents an inflector
processing method. |
|
boolean |
requiresEntity()
Provides information on presence of an entity parameter. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <T> Invocable create(Inflector<Request,T> inflector)
inflector - inflector processing the request method.public static Invocable create(java.lang.Class<? extends Inflector> inflectorClass)
inflectorClass - inflector syb-type processing the request method.
public static Invocable create(MethodHandler handler,
java.lang.reflect.Method handlingMethod)
handler - resource method handler.handlingMethod - handling Java method.
public static Invocable create(MethodHandler handler,
java.lang.reflect.Method handlingMethod,
boolean encodedParameters)
handler - resource method handler.handlingMethod - handling Java method.encodedParameters - true if the automatic parameter decoding
should be disabled, false otherwise.public MethodHandler getHandler()
handling resource method on.
public java.lang.reflect.Method getHandlingMethod()
public GenericType<?> getResponseType()
public boolean isInflector()
inflector
processing method.
true, if this invocable represents an inflector invocation,
false otherwise.public boolean requiresEntity()
Parameterized
requiresEntity in interface Parameterizedpublic java.util.List<Parameter> getParameters()
Parameterized
getParameters in interface Parameterizedpublic void accept(ResourceModelVisitor visitor)
ResourceModelComponent
accept in interface ResourceModelComponentvisitor - resource model visitor.public java.util.List<? extends ResourceModelComponent> getComponents()
ResourceModelComponent
getComponents in interface ResourceModelComponentpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||