| org.restlet.Filter com.noelios.restlet.application.Decoder
Decoder | public class Decoder extends Filter (Code) | | Filter decompressing entities.
author: Jerome Louvel (contact@noelios.com) |
Constructor Summary | |
public | Decoder(Context context) Constructor to only decode request entities before handling. | public | Decoder(Context context, boolean decodeRequest, boolean decodeResponse) Constructor. |
Method Summary | |
public void | afterHandle(Request request, Response response) Allows filtering after its handling by the target Restlet. | public void | beforeHandle(Request request, Response response) Allows filtering before its handling by the target Restlet. | public boolean | canDecode(Representation representation) Indicates if a representation can be decoded.
Parameters: representation - The representation to test. | public Representation | decode(Representation representation) Decodes a given representation if its encodings are supported by NRE.
Parameters: representation - The representation to encode. | public boolean | isDecodeRequest() Indicates if the request entity should be decoded. | public boolean | isDecodeResponse() Indicates if the response entity should be decoded. | public void | setDecodeRequest(boolean decodeRequest) Indicates if the request entity should be decoded. | public void | setDecodeResponse(boolean decodeResponse) Indicates if the response entity should be decoded. |
Decoder | public Decoder(Context context)(Code) | | Constructor to only decode request entities before handling.
Parameters: context - The context. |
Decoder | public Decoder(Context context, boolean decodeRequest, boolean decodeResponse)(Code) | | Constructor.
Parameters: context - The context. Parameters: decodeRequest - Indicates if the request entity should be decoded. Parameters: decodeResponse - Indicates if the response entity should be decoded. |
afterHandle | public void afterHandle(Request request, Response response)(Code) | | Allows filtering after its handling by the target Restlet. Does nothing
by default.
Parameters: request - The request to filter. Parameters: response - The response to filter. |
beforeHandle | public void beforeHandle(Request request, Response response)(Code) | | Allows filtering before its handling by the target Restlet. Does nothing
by default.
Parameters: request - The request to filter. Parameters: response - The response to filter. |
canDecode | public boolean canDecode(Representation representation)(Code) | | Indicates if a representation can be decoded.
Parameters: representation - The representation to test. True if the call can be decoded. |
decode | public Representation decode(Representation representation)(Code) | | Decodes a given representation if its encodings are supported by NRE.
Parameters: representation - The representation to encode. The decoded representation or the original one if the encodingisn't supported by NRE. |
isDecodeRequest | public boolean isDecodeRequest()(Code) | | Indicates if the request entity should be decoded.
True if the request entity should be decoded. |
isDecodeResponse | public boolean isDecodeResponse()(Code) | | Indicates if the response entity should be decoded.
True if the response entity should be decoded. |
setDecodeRequest | public void setDecodeRequest(boolean decodeRequest)(Code) | | Indicates if the request entity should be decoded.
Parameters: decodeRequest - True if the request entity should be decoded. |
setDecodeResponse | public void setDecodeResponse(boolean decodeResponse)(Code) | | Indicates if the response entity should be decoded.
Parameters: decodeResponse - True if the response entity should be decoded. |
|
|