public class TypedProtocolOpFilter extends Object implements RequestFilter
RequestFilter
s whose behavior depends on the type of Request
and
Response
.
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)
and filterAnyResponse(Context, Request, Response)
methods.
TypedRequestFilter
,
RequestFilter
Constructor and Description |
---|
TypedProtocolOpFilter() |
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterAbandonResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.AbandonRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of an AbandonRequest.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterAddResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.AddRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of an AddRequest.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterAnyResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.Request request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the common behavior for all the responses for which no specific behavior has been specified by an
overridden observe*Response() like method.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterBindResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.BindRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of a BindRequest.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterCompareResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.CompareRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of a CompareRequest.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterDeleteResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.DeleteRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of a DeleteRequest.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterExtendedResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.ExtendedRequest<?> request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of a ExtendedRequest.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterInvalidResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.InvalidRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of an InvalidRequest.
|
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)
Forwards the request to the next handler in the chain.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterModifyDnResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.ModifyDnRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of a ModifyDnRequest.
|
protected void |
filterModifyResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.ModifyRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of a ModifyRequest.
|
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)
Forwards the request to the next handler in the chain.
|
protected boolean |
filterSearchResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.SearchRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of a SearchRequest.
|
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)
Forwards the request to the next handler in the chain.
|
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)
Forwards the request to the next handler in the chain.
|
protected void |
filterUnknownResponse(org.forgerock.services.context.Context context,
org.forgerock.opendj.ldap.messages.UnknownRequest request,
org.forgerock.opendj.ldap.messages.Response response)
Implements the behavior for all the responses of an UnknownRequest.
|
public TypedProtocolOpFilter()
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
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 void filterAnyResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.Request request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterAbandonResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.AbandonRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterAddResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.AddRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterBindResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.BindRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterCompareResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.CompareRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterDeleteResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.DeleteRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterExtendedResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.ExtendedRequest<?> request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterInvalidResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.InvalidRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 boolean filterSearchResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.SearchRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.true
to allow the message passes the filter, false
to drop it.Exception
- If an error occurred during the processing of the response.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
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 void filterModifyResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.ModifyRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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 void filterModifyDnResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.ModifyDnRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.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
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
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 void filterUnknownResponse(org.forgerock.services.context.Context context, org.forgerock.opendj.ldap.messages.UnknownRequest request, org.forgerock.opendj.ldap.messages.Response response) throws Exception
context
- The request context.request
- The request associated to the response.response
- The response which has been created by the RequestHandler.Exception
- If an error occurred during the processing of the response.Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.