public class Decoder extends Filter
Constructor and Description |
---|
Decoder(Context context)
Constructor to only decode request entities before handling.
|
Decoder(Context context,
boolean decodingRequest,
boolean decodingResponse)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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()
Deprecated.
Use
isDecodingRequest() instead. |
boolean |
isDecodeResponse()
Deprecated.
Use
isDecodingResponse() instead. |
boolean |
isDecodingRequest()
Indicates if the request entity should be decoded.
|
boolean |
isDecodingResponse()
Indicates if the response entity should be decoded.
|
void |
setDecodeRequest(boolean decodingRequest)
Deprecated.
Use
setDecodingRequest(boolean) instead. |
void |
setDecodeResponse(boolean decodingResponse)
Deprecated.
Use
setDecodingResponse(boolean) instead. |
void |
setDecodingRequest(boolean decodingRequest)
Indicates if the request entity should be decoded.
|
void |
setDecodingResponse(boolean decodingResponse)
Indicates if the response entity should be decoded.
|
doHandle, getNext, handle, hasNext, setNext, setNext, start, stop
finalize, getApplication, getAuthor, getContext, getDescription, getLogger, getName, getOwner, isStarted, isStopped, setAuthor, setContext, setDescription, setName, setOwner
public Decoder(Context context)
context
- The context.public Decoder(Context context, boolean decodingRequest, boolean decodingResponse)
context
- The context.decodingRequest
- Indicates if the request entity should be decoded.decodingResponse
- Indicates if the response entity should be decoded.public void afterHandle(Request request, Response response)
afterHandle
in class Filter
request
- The request to filter.response
- The response to filter.public int beforeHandle(Request request, Response response)
beforeHandle
in class Filter
request
- 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.@Deprecated public boolean isDecodeRequest()
isDecodingRequest()
instead.@Deprecated public boolean isDecodeResponse()
isDecodingResponse()
instead.public boolean isDecodingRequest()
public boolean isDecodingResponse()
@Deprecated public void setDecodeRequest(boolean decodingRequest)
setDecodingRequest(boolean)
instead.decodingRequest
- True if the request entity should be decoded.@Deprecated public void setDecodeResponse(boolean decodingResponse)
setDecodingResponse(boolean)
instead.decodingResponse
- True if the response entity should be decoded.public void setDecodingRequest(boolean decodingRequest)
decodingRequest
- True if the request entity should be decoded.public void setDecodingResponse(boolean decodingResponse)
decodingResponse
- True if the response entity should be decoded.Copyright © 2005–2016. All rights reserved.