Package org.forgerock.http.handler
Class Handlers
java.lang.Object
org.forgerock.http.handler.Handlers
Utility methods for creating common types of handlers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DescribableHandlerasDescribableHandler(Handler handler) Adapts aHandlerto aDescribableHandlerwithout adding support for API Descriptions if it is not already implemented.static DescribableHandlerCreates aHandlerwhich wraps the provided filters around the provided target handler.static DescribableHandlerCreates aHandlerwhich wraps the provided filters around the provided target handler.static DescribableHandlerCreates a "filtered handler" instance.static HandlerA common HTTP FrameworkHandlerresponding 403 Forbidden.static HandlerA common HTTP FrameworkHandlerresponding 500 Internal Server Error.
-
Method Details
-
filtered
Creates a "filtered handler" instance.It will invoke the
firstfilter, giving it thehandlerhandler asnext.- Parameters:
handler- The filtered instancefilter- the filter to apply- Returns:
- a new
Handlerinstance that filters the givenhandler.
-
chainOf
Creates aHandlerwhich wraps the provided filters around the provided target handler.- Parameters:
handler- The target handler which will be invoked once processing has reached the end of the filter chain.filters- The list of filters to be processed before invoking the target.- Returns:
- A
Handler. - See Also:
-
chainOf
Creates aHandlerwhich wraps the provided filters around the provided target handler.- Parameters:
handler- The target handler which will be invoked once processing has reached the end of the filter chain.filters- The list of filters to be processed before invoking the target.- Returns:
- A
Handler. - See Also:
-
asDescribableHandler
Adapts aHandlerto aDescribableHandlerwithout adding support for API Descriptions if it is not already implemented.- Parameters:
handler- The handler.- Returns:
- The describable handler.
-
internalServerErrorHandler
A common HTTP FrameworkHandlerresponding 500 Internal Server Error.- Parameters:
cause- The cause of the internal server error.- Returns:
- The handler.
-
forbiddenHandler
A common HTTP FrameworkHandlerresponding 403 Forbidden.- Returns:
- The handler.
-