org.glassfish.jersey.server
Interface Application.Builder.BoundBuilder

Enclosing interface:
Application.Builder

public static interface Application.Builder.BoundBuilder

Represents a supported resource path to which new resource methods and sub-resource locators can be attached.


Method Summary
 Application.Builder.BoundBuilder consumes(javax.ws.rs.core.MediaType... mediaTypes)
          Set supported request media types (equivalent of Consumes) for the current path.
 Application.Builder.ResourceMethodBuilder method(String... methods)
          Bind new HTTP methods to the path previously configured in this builder.
 Application.Builder.BoundBuilder produces(javax.ws.rs.core.MediaType... mediaTypes)
          Set supported response media types (equivalent of Produces) for the current path.
 Application.Builder.BoundBuilder subPath(String subPath)
          Append sub-path to the current path which can be used to bind new sub-resource methods and locators.
 

Method Detail

method

Application.Builder.ResourceMethodBuilder method(String... methods)
Bind new HTTP methods to the path previously configured in this builder. If any of the specified methods has already been bound earlier, the previous method binding will be overridden.

Invoking is method is equivalent to placing a http method meta-annotated annotation on a resource method in an annotation-based resource class. See the application builder example for more information.

Parameters:
methods - set of HTTP methods to be bound. Any duplicate values will be automatically discarded.
Returns:
configured resource method builder instance.

produces

Application.Builder.BoundBuilder produces(javax.ws.rs.core.MediaType... mediaTypes)
Set supported response media types (equivalent of Produces) for the current path. Overrides any previously set values.

Invoking is method is equivalent to placing @Produces annotation on a resource class in an annotation-based resource class. See the application builder example for more information.

Parameters:
mediaTypes - supported response media types.
Returns:
Application.Builder.ResourceMethodBuilder updated builder instance}.

consumes

Application.Builder.BoundBuilder consumes(javax.ws.rs.core.MediaType... mediaTypes)
Set supported request media types (equivalent of Consumes) for the current path. Overrides any previously set values.

Invoking is method is equivalent to placing @Consumes annotation on a resource class in an annotation-based resource class. See the application builder example for more information.

Parameters:
mediaTypes - supported request media types.
Returns:
Application.Builder.BoundBuilder updated builder instance}.

subPath

Application.Builder.BoundBuilder subPath(String subPath)
Append sub-path to the current path which can be used to bind new sub-resource methods and locators.

Invoking is method is equivalent to putting @Path annotation on a sub-resource method or sub-resource locator in an annotation-based resource class. See the application builder example for more information.

Parameters:
subPath - path to be appended to the current path value.
Returns:
updated builder instance bound the the new path.


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