|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FilterInterface
Method Summary | |
---|---|
ReplyInterface |
exceptionFilter(RequestInterface request,
ProtocolException ex,
FilterInterface[] filters,
int fidx)
|
ReplyInterface |
ingoingFilter(RequestInterface request,
FilterInterface[] filters,
int fidx)
The filter's ingoing method is called before any request processing is done by the target resource. |
boolean |
lookup(LookupState ls,
LookupResult lr)
The lookup stage filtering. |
ReplyInterface |
outgoingFilter(RequestInterface request,
ReplyInterface reply,
FilterInterface[] filters,
int fidx)
The filter's outgoing method is called once the target resource has computed a reply. |
java.io.OutputStream |
outputFilter(RequestInterface request,
ReplyInterface reply,
java.io.OutputStream output)
|
Method Detail |
---|
boolean lookup(LookupState ls, LookupResult lr) throws ProtocolException
ls
- The current lookup state, describing the state of the lookup
operation in progress.lr
- The current lookup result, describing the already computed
part of the lookup operation.
ProtocolException
- If some error occurs, and the whole
lookup operation cannot be continued normally.ReplyInterface ingoingFilter(RequestInterface request, FilterInterface[] filters, int fidx) throws ProtocolException
This method can (if able) compute the whole request's reply, and return it. If processing should continue normally, then the filter must return null.
If a filter's ingoingFilter
method gets called,
then it is guaranteed that either its outgoingFilter
method or its exceptionFilter
method gets called.
request
- The request being processed.filters
- The whole array of filters to be applied before
actually continuing the process.fidx
- The index in the above array of the filter being called.
ProtocolException
- If the filter fails.ReplyInterface outgoingFilter(RequestInterface request, ReplyInterface reply, FilterInterface[] filters, int fidx) throws ProtocolException
This method can return a Reply instance, in which case, the processing should be aborted, and the returned reply should be emited back to the client. Otherwise, if the filter returns null the processing continues normally.
request
- The request being processed.reply
- The original reply, as emited by the target resource,
and which has already been processed by the first filters.filters
- The whole array of filters to be applied before
actually continuing the process.fidx
- The index in the above array of the filter being called.
ProtocolException
- If the filter fails.ReplyInterface exceptionFilter(RequestInterface request, ProtocolException ex, FilterInterface[] filters, int fidx)
request
- The request being processed.ex
- The exception that occured during processing the request.
and which has already been processed by the first filters.filters
- The whole array of filters to be applied before
actually continuing the process.fidx
- The index in the above array of the filter being called.java.io.OutputStream outputFilter(RequestInterface request, ReplyInterface reply, java.io.OutputStream output)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |