Class MethodSelectingRouter.ConsumesProducesAcceptor
java.lang.Object
org.glassfish.jersey.server.internal.routing.MethodSelectingRouter.ConsumesProducesAcceptor
- Enclosing class:
MethodSelectingRouter
Represents a 1-1-1 relation between input and output media type and an methodAcceptorPair.
E.g. for a single resource method
@Consumes("*/*")
@Produces("text/plain","text/html")
@GET
public String myGetMethod() {
return "S";
}
the following two relations would be generated:
| consumes | produces | method |
|---|---|---|
| */* | text/plain | myGetMethod |
| */* | text/html | myGetMethod |
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final CombinedMediaType.EffectiveMediaType(package private) final MethodRouting(package private) final CombinedMediaType.EffectiveMediaType -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConsumesProducesAcceptor(CombinedMediaType.EffectiveMediaType consumes, CombinedMediaType.EffectiveMediaType produces, MethodRouting methodRouting) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()(package private) booleanisConsumable(ContainerRequest requestContext) Determines whether thisConsumesProducesAcceptorrouter can process therequest.toString()
-
Field Details
-
consumes
-
produces
-
methodRouting
-
-
Constructor Details
-
ConsumesProducesAcceptor
private ConsumesProducesAcceptor(CombinedMediaType.EffectiveMediaType consumes, CombinedMediaType.EffectiveMediaType produces, MethodRouting methodRouting)
-
-
Method Details
-
isConsumable
Determines whether thisConsumesProducesAcceptorrouter can process therequest.- Parameters:
requestContext- The request to be tested.- Returns:
- True if the
requestcan be processed by this router, false otherwise.
-
toString
-
equals
-
hashCode
public int hashCode()
-