org.glassfish.jersey.server.model
Class SubResourceMethod

java.lang.Object
  extended by org.glassfish.jersey.server.model.AbstractResourceMethod
      extended by org.glassfish.jersey.server.model.AbstractSubResourceMethod
          extended by org.glassfish.jersey.server.model.SubResourceMethod
All Implemented Interfaces:
ConsumesProducesEnabledComponent, InvocableResourceMethod, Parameterized, PathAnnotated, ResourceModelComponent, SuspendableComponent

public class SubResourceMethod
extends AbstractSubResourceMethod
implements PathAnnotated, Parameterized, InvocableResourceMethod

Abstraction for a sub-resource method

Author:
Marc Hadley (marc.hadley at sun.com), Jakub Podlesak (jakub.podlesak at oracle.com)

Constructor Summary
SubResourceMethod(ResourceClass resource, Method method, Class returnType, Type genericReturnType, PathValue uriPath, String httpMethod, Annotation[] markers)
           
 
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.
 Type getGenericReturnType()
          Getter for the method generic return type
 Method getMethod()
          Getter for the Java method
 List<Parameter> getParameters()
          Provides access to all parameters associated with given Parameterized instance.
 Class<?> getReturnType()
          Getter for the method return type
 boolean hasEntity()
          Provides information on presence of an entity parameter.
 String toString()
           
 
Methods inherited from class org.glassfish.jersey.server.model.AbstractSubResourceMethod
getPath
 
Methods inherited from class org.glassfish.jersey.server.model.AbstractResourceMethod
areInputTypesDeclared, areOutputTypesDeclared, declareSuspend, getComponents, getDeclaringResource, getHttpMethod, getSupportedInputTypes, getSupportedOutputTypes, getSuspendTimeout, getSuspendTimeoutUnit, isSuspendDeclared, setAreInputTypesDeclared, setAreOutputTypesDeclared
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.glassfish.jersey.server.model.PathAnnotated
getPath
 
Methods inherited from interface org.glassfish.jersey.server.model.InvocableResourceMethod
getDeclaringResource
 
Methods inherited from interface org.glassfish.jersey.server.model.ConsumesProducesEnabledComponent
areInputTypesDeclared, areOutputTypesDeclared, getSupportedInputTypes, getSupportedOutputTypes, setAreInputTypesDeclared, setAreOutputTypesDeclared
 
Methods inherited from interface org.glassfish.jersey.server.model.SuspendableComponent
declareSuspend, getSuspendTimeout, getSuspendTimeoutUnit, isSuspendDeclared
 

Constructor Detail

SubResourceMethod

public SubResourceMethod(ResourceClass resource,
                         Method method,
                         Class returnType,
                         Type genericReturnType,
                         PathValue uriPath,
                         String httpMethod,
                         Annotation[] markers)
Method Detail

accept

public void accept(ResourceModelVisitor visitor)
Description copied from interface: ResourceModelComponent
A component should call the visitor back with an appropriate visitor interface method to give it a chance to process.

Specified by:
accept in interface ResourceModelComponent
Parameters:
visitor - resource model visitor.

getMethod

public Method getMethod()
Description copied from interface: InvocableResourceMethod
Getter for the Java method

Specified by:
getMethod in interface InvocableResourceMethod
Returns:
corresponding Java method

getReturnType

public Class<?> getReturnType()
Description copied from interface: InvocableResourceMethod
Getter for the method return type

Specified by:
getReturnType in interface InvocableResourceMethod
Returns:
corresponding Java method return type

getGenericReturnType

public Type getGenericReturnType()
Description copied from interface: InvocableResourceMethod
Getter for the method generic return type

Specified by:
getGenericReturnType in interface InvocableResourceMethod
Returns:
corresponding Java method generic return type

toString

public String toString()
Overrides:
toString in class AbstractResourceMethod

getParameters

public List<Parameter> getParameters()
Description copied from interface: Parameterized
Provides access to all parameters associated with given Parameterized instance.

Specified by:
getParameters in interface Parameterized
Returns:
list of actual parameters

hasEntity

public boolean hasEntity()
Description copied from interface: Parameterized
Provides information on presence of an entity parameter.

Specified by:
hasEntity in interface Parameterized
Returns:
true if entity parameter is present, false otherwise


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.