Package org.glassfish.jersey.model
Class ContractProvider
java.lang.Object
org.glassfish.jersey.model.ContractProvider
Jersey contract provider model.
- Author:
- Marek Potociar
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Contract provider model builder. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ContractProvider.Builder
Create new contract provider model builder.static ContractProvider.Builder
builder
(ContractProvider original) Create new contract provider model builder from an existing one.Get the map of contracts and their priorities.Get provided contracts recognized by Jersey.Class<?>
Get the implementation class which the contracts belong to.Set<Class<? extends Annotation>>
Get the collection of name bindings attached to this component.int
getPriority
(Class<?> contract) Get the provider contract priority, if set, default component provider, if not set.Class<? extends Annotation>
getScope()
Get model component scope.boolean
Check if the component is bound or not.
-
Field Details
-
NO_PRIORITY
public static final int NO_PRIORITY"No priority" constant.- See Also:
-
-
Method Details
-
builder
Create new contract provider model builder.- Parameters:
implementationClass
- class which the contracts belong to.- Returns:
- new contract provider builder.
-
builder
Create new contract provider model builder from an existing one.- Parameters:
original
- existing contract provider model.- Returns:
- new contract provider builder.
-
getScope
Description copied from interface:Scoped
Get model component scope. -
getImplementationClass
Get the implementation class which the contracts belong to.- Returns:
- implementation class.
-
getContracts
Get provided contracts recognized by Jersey.- Returns:
- provided contracts.
- See Also:
-
getContractMap
Get the map of contracts and their priorities.- Returns:
- contracts and their priorities.
-
isNameBound
public boolean isNameBound()Description copied from interface:NameBound
Check if the component is bound or not.- Specified by:
isNameBound
in interfaceNameBound
- Returns:
true
if the component is bound,false
otherwise.
-
getPriority
Get the provider contract priority, if set, default component provider, if not set.- Parameters:
contract
- provider contract.- Returns:
- provider priority.
- See Also:
-
Priority
-
getNameBindings
Description copied from interface:NameBound
Get the collection of name bindings attached to this component.- Specified by:
getNameBindings
in interfaceNameBound
- Returns:
- collection of name binding annotation types.
-