org.glassfish.jersey.server.model
Interface ConsumesProducesEnabledComponent

All Known Subinterfaces:
InvocableResourceMethod
All Known Implementing Classes:
AbstractResourceMethod, AbstractSubResourceMethod, InflectorBasedResourceMethod, ResourceMethod, SubResourceMethod

public interface ConsumesProducesEnabledComponent

Jersey model component that may contain consumes and produces information.

Author:
Jakub Podlesak (jakub.podlesak at oracle.com)

Method Summary
 boolean areInputTypesDeclared()
          Provides information on whether consumed media types were explicitly configured for this component.
 boolean areOutputTypesDeclared()
          Provides information on whether produced media types were explicitly configured for this component.
 List<javax.ws.rs.core.MediaType> getSupportedInputTypes()
          Getter for consumed media types.
 List<javax.ws.rs.core.MediaType> getSupportedOutputTypes()
          Getter for produced media types.
 void setAreInputTypesDeclared(boolean declared)
          Setter for information on how the consumed media types were configured.
 void setAreOutputTypesDeclared(boolean declared)
          Setter for information on how the produced media types were configured.
 

Method Detail

areInputTypesDeclared

boolean areInputTypesDeclared()
Provides information on whether consumed media types were explicitly configured for this component.

Returns:
true if consumed media types were configured explicitly

areOutputTypesDeclared

boolean areOutputTypesDeclared()
Provides information on whether produced media types were explicitly configured for this component.

Returns:
true if produced media types were configured explicitly

getSupportedInputTypes

List<javax.ws.rs.core.MediaType> getSupportedInputTypes()
Getter for consumed media types. Returned list could be mutable if given component supports updating.

Returns:
list of consumed media types
See Also:
areInputTypesDeclared()

getSupportedOutputTypes

List<javax.ws.rs.core.MediaType> getSupportedOutputTypes()
Getter for produced media types. Returned list could be mutable if given component supports updating.

Returns:
list of produced media types
See Also:
areOutputTypesDeclared()

setAreInputTypesDeclared

void setAreInputTypesDeclared(boolean declared)
                              throws OperationNotSupportedException
Setter for information on how the consumed media types were configured.

Parameters:
declared - should be set to true if consumed media types were configured explicitly.
Throws:
OperationNotSupportedException - if the component is immutable.

setAreOutputTypesDeclared

void setAreOutputTypesDeclared(boolean declared)
                               throws OperationNotSupportedException
Setter for information on how the produced media types were configured.

Parameters:
declared - should be set to true if produced media types were configured explicitly.
Throws:
OperationNotSupportedException - if the component is immutable.


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