Package org.refcodes.net
Interface MediaTypeFactoryLookup
-
- All Known Subinterfaces:
MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
public interface MediaTypeFactoryLookup
The Interface MediaTypeFactoryLookup.- Author:
- steiner
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
Adds functionality to modify theMediaTypeFactoryLookup
e.g.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MediaType[]
getFactoryMediaTypes()
Returns the currently supportedMediaType
s as of theMediaTypeFactory
instances being added and in the order of them being added.default boolean
hasMediaTypeFactory(MediaType aMediaType)
Determines whether there is aMediaTypeFactory
for the givenMediaType
.MediaTypeFactory
toMediaTypeFactory(MediaType aMediaType)
Retrieves theMediaTypeFactory
related to the givenMediaType
or null if there is none suchMediaTypeFactory
.
-
-
-
Method Detail
-
toMediaTypeFactory
MediaTypeFactory toMediaTypeFactory(MediaType aMediaType)
Retrieves theMediaTypeFactory
related to the givenMediaType
or null if there is none suchMediaTypeFactory
.- Parameters:
aMediaType
- the media type- Returns:
- The according
MediaTypeFactory
or null if there is none such.
-
hasMediaTypeFactory
default boolean hasMediaTypeFactory(MediaType aMediaType)
Determines whether there is aMediaTypeFactory
for the givenMediaType
.- Parameters:
aMediaType
- the media type- Returns:
- True in case there is a
MediaTypeFactory
responsible for the givenMediaType
, else false.
-
getFactoryMediaTypes
MediaType[] getFactoryMediaTypes()
Returns the currently supportedMediaType
s as of theMediaTypeFactory
instances being added and in the order of them being added. The order is important as the firstMediaType
found in the returned array may be used as defaultMediaType
e.g. when no Content-Type has been specified.- Returns:
- The currently supported
MediaType
s in the order of theMediaTypeFactory
instance having been added.
-
-