public class TypedRequestFilter extends Object implements RequestFilter
RequestFilter
s whose behavior depends on the type of Request
.
It is possible to provides specific behavior for different request types by selectively overriding the filter*()
methods. Common behaviour can be added for the remaining request types by overriding the
filterAny(Context, Request, RequestHandler)
method.
TypedProtocolOpFilter
,
RequestFilter
Constructor and Description |
---|
TypedRequestFilter() |
Modifier and Type | Method and Description |
---|---|
io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filter(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.Request request,
RequestHandler next)
Filters the request and/or response of an exchange.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterAbandon(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.AbandonRequest request,
RequestHandler next)
Filters abandon requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterAdd(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.AddRequest request,
RequestHandler next)
Filters add requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterAny(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.Request request,
RequestHandler next)
Filters requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterBind(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.BindRequest request,
RequestHandler next)
Filters bind requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterCompare(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.CompareRequest request,
RequestHandler next)
Filters compare requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterDelete(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.DeleteRequest request,
RequestHandler next)
Filters delete requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterExtended(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.ExtendedRequest<?> request,
RequestHandler next)
Filters extended requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterInvalid(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.InvalidRequest request,
RequestHandler next)
Filters invalid requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterModify(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.ModifyRequest request,
RequestHandler next)
Filters modify requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterModifyDn(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.ModifyDnRequest request,
RequestHandler next)
Filters modify-dn requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterSearch(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.SearchRequest request,
RequestHandler next)
Filters search requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterUnbind(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.UnbindRequest request,
RequestHandler next)
Filters unbind requests and their responses.
|
protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> |
filterUnknown(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.UnknownRequest request,
RequestHandler next)
Filters unknown requests and their responses.
|
public TypedRequestFilter()
public final io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filter(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.Request request, RequestHandler next) throws Exception
RequestFilter
next.handle(context, request)
.
This method may elect not to pass the request to the next filter or
handler, and instead handle the request itself. It can achieve this by
merely avoiding a call to next.handle(context, request)
and creating its own response object. The filter is also at liberty to
replace a response with another of its own by intercepting the response
returned by the next handler.
filter
in interface RequestFilter
context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the
client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterAny(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.Request request, RequestHandler next) throws Exception
RequestHandler.handle(Context, Request)
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterAbandon(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.AbandonRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterAdd(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.AddRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterBind(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.BindRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterCompare(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.CompareRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterDelete(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.DeleteRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterExtended(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.ExtendedRequest<?> request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterInvalid(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.InvalidRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterSearch(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.SearchRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterModify(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.ModifyRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterModifyDn(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.ModifyDnRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterUnbind(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.UnbindRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.protected io.reactivex.Flowable<org.forgerock.opendj.ldap.messages.Response> filterUnknown(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.UnknownRequest request, RequestHandler next) throws Exception
#filterAny(Context,
Request, RequestHandler))
.context
- The request context.request
- The request.next
- The next filter or handler in the chain to handle the request.Flowable
representing the response to be returned to the client.Exception
- If an error occurred during the processing of the request.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.