Package net.officefloor.web.accept
Class AcceptNegotiatorImpl<H>
java.lang.Object
net.officefloor.web.accept.AcceptNegotiatorImpl<H>
- All Implemented Interfaces:
AcceptNegotiator<H>
AcceptNegotiator implementation.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAccept handler. -
Constructor Summary
ConstructorsConstructorDescriptionAcceptNegotiatorImpl(AcceptNegotiatorImpl.AcceptHandler<H>[] acceptHandlers) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionstatic <H> AcceptNegotiatorImpl.AcceptHandler<H>createAcceptHandler(String contentType, H[] handlers) Creates theAcceptNegotiatorImpl.AcceptHandler.H[]getHandler(HttpRequest request) Obtains the acceptable handlers for theHttpRequest.
-
Constructor Details
-
AcceptNegotiatorImpl
Instantiate.- Parameters:
acceptHandlers-AcceptNegotiatorImpl.AcceptHandlerinstances.
-
-
Method Details
-
createAcceptHandler
public static <H> AcceptNegotiatorImpl.AcceptHandler<H> createAcceptHandler(String contentType, H[] handlers) Creates theAcceptNegotiatorImpl.AcceptHandler.- Type Parameters:
H- Handle type.- Parameters:
contentType-Content-Typehandlers- Handler.- Returns:
AcceptNegotiatorImpl.AcceptHandler.
-
getHandler
Description copied from interface:AcceptNegotiatorObtains the acceptable handlers for theHttpRequest.- Specified by:
getHandlerin interfaceAcceptNegotiator<H>- Parameters:
request-HttpRequest.- Returns:
- Acceptable handlers, or
nullif no acceptable handlers.
-