|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.Uniform
org.restlet.Restlet
org.restlet.Filter
com.noelios.restlet.application.Decoder
public class Decoder
Filter decompressing entities. Concurrency note: instances of this class or its subclasses can be invoked by several threads at the same time and therefore must be thread-safe. You should be especially careful when storing state in member variables.
| Field Summary |
|---|
| Fields inherited from class org.restlet.Filter |
|---|
CONTINUE, SKIP, STOP |
| Constructor Summary | |
|---|---|
Decoder(Context context)
Constructor to only decode request entities before handling. |
|
Decoder(Context context,
boolean decodeRequest,
boolean decodeResponse)
Constructor. |
|
| Method Summary | |
|---|---|
void |
afterHandle(Request request,
Response response)
Allows filtering after its handling by the target Restlet. |
int |
beforeHandle(Request request,
Response response)
Allows filtering before its handling by the target Restlet. |
boolean |
canDecode(Representation representation)
Indicates if a representation can be decoded. |
Representation |
decode(Representation representation)
Decodes a given representation if its encodings are supported by NRE. |
boolean |
isDecodeRequest()
Indicates if the request entity should be decoded. |
boolean |
isDecodeResponse()
Indicates if the response entity should be decoded. |
void |
setDecodeRequest(boolean decodeRequest)
Indicates if the request entity should be decoded. |
void |
setDecodeResponse(boolean decodeResponse)
Indicates if the response entity should be decoded. |
| Methods inherited from class org.restlet.Filter |
|---|
doHandle, getNext, handle, hasNext, setNext, setNext |
| Methods inherited from class org.restlet.Restlet |
|---|
getApplication, getContext, getLogger, init, isStarted, isStopped, setContext, start, stop |
| Methods inherited from class org.restlet.Uniform |
|---|
delete, delete, get, get, handle, head, head, options, options, post, post, put, put |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Decoder(Context context)
context - The context.
public Decoder(Context context,
boolean decodeRequest,
boolean decodeResponse)
context - The context.decodeRequest - Indicates if the request entity should be decoded.decodeResponse - Indicates if the response entity should be decoded.| Method Detail |
|---|
public void afterHandle(Request request,
Response response)
afterHandle in class Filterrequest - The request to filter.response - The response to filter.
public int beforeHandle(Request request,
Response response)
beforeHandle in class Filterrequest - The request to filter.response - The response to filter.
public boolean canDecode(Representation representation)
representation - The representation to test.
public Representation decode(Representation representation)
representation - The representation to encode.
public boolean isDecodeRequest()
public boolean isDecodeResponse()
public void setDecodeRequest(boolean decodeRequest)
decodeRequest - True if the request entity should be decoded.public void setDecodeResponse(boolean decodeResponse)
decodeResponse - True if the response entity should be decoded.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||