Package net.officefloor.web.accept
Class AcceptNegotiatorImpl<H>
- java.lang.Object
-
- net.officefloor.web.accept.AcceptNegotiatorImpl<H>
-
- All Implemented Interfaces:
AcceptNegotiator<H>
public class AcceptNegotiatorImpl<H> extends java.lang.Object implements AcceptNegotiator<H>
AcceptNegotiatorimplementation.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAcceptNegotiatorImpl.AcceptHandler<H>Accept handler.
-
Constructor Summary
Constructors Constructor Description AcceptNegotiatorImpl(AcceptNegotiatorImpl.AcceptHandler<H>[] acceptHandlers)Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <H> AcceptNegotiatorImpl.AcceptHandler<H>createAcceptHandler(java.lang.String contentType, H handler)Creates theAcceptNegotiatorImpl.AcceptHandler.HgetHandler(HttpRequest request)Obtains the acceptable handler for theHttpRequest.
-
-
-
Constructor Detail
-
AcceptNegotiatorImpl
public AcceptNegotiatorImpl(AcceptNegotiatorImpl.AcceptHandler<H>[] acceptHandlers)
Instantiate.- Parameters:
acceptHandlers-AcceptNegotiatorImpl.AcceptHandlerinstances.
-
-
Method Detail
-
createAcceptHandler
public static <H> AcceptNegotiatorImpl.AcceptHandler<H> createAcceptHandler(java.lang.String contentType, H handler)
Creates theAcceptNegotiatorImpl.AcceptHandler.- Type Parameters:
H- Handle type.- Parameters:
contentType-Content-Typehandler- Handler.- Returns:
AcceptNegotiatorImpl.AcceptHandler.
-
getHandler
public H getHandler(HttpRequest request)
Description copied from interface:AcceptNegotiatorObtains the acceptable handler for theHttpRequest.- Specified by:
getHandlerin interfaceAcceptNegotiator<H>- Parameters:
request-HttpRequest.- Returns:
- Acceptable handler, or
nullif no acceptable handler.
-
-