Module org.refcodes.web
Package org.refcodes.web
Interface MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
- All Superinterfaces:
MediaTypeFactoryLookup
- Enclosing interface:
- MediaTypeFactoryLookup
public static interface MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
extends MediaTypeFactoryLookup
Adds functionality to modify the
MediaTypeFactoryLookup
e.g.
adding additional MediaTypeFactory
instances by using
addMediaTypeFactory(MediaTypeFactory)
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.web.MediaTypeFactoryLookup
MediaTypeFactoryLookup.MutableMediaTypeFactoryLookup
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addMediaTypeFactory
(MediaTypeFactory aMediaTypeFactory) Registers aMediaTypeFactory
for marshaling and unmarshaling a HTTP-Request's body of the accordingMediaType
.Methods inherited from interface org.refcodes.web.MediaTypeFactoryLookup
getFactoryMediaTypes, hasMediaTypeFactory, toMediaTypeFactory
-
Method Details
-
addMediaTypeFactory
Registers aMediaTypeFactory
for marshaling and unmarshaling a HTTP-Request's body of the accordingMediaType
. AMediaTypeFactory
is responsible for exactly oneMediaType
, declared via theMediaTypesAccessor.getMediaTypes()
method. .- Parameters:
aMediaTypeFactory
- TheMediaTypeFactory
to be registered.- Returns:
- True in case the
MediaTypeFactory
has successfully been registered, false in case there has already aMediaTypeFactory
been registered which is responsible for the providedMediaTypeFactory
'sMediaType
.
-