net.named_data.jndn
public class ControlResponse extends Object
Constructor and Description |
---|
ControlResponse()
Create a new ControlResponse where all values are unspecified.
|
ControlResponse(ControlResponse controlResponse)
Create a new ControlResponse as a deep copy of the given ControlResponse.
|
Modifier and Type | Method and Description |
---|---|
ControlParameters |
getBodyAsControlParameters()
Get the control response body as a ControlParameters.
|
int |
getStatusCode()
Get the status code.
|
String |
getStatusText()
Get the status text.
|
ControlResponse |
setBodyAsControlParameters(ControlParameters controlParameters)
Set the control response body as a ControlParameters.
|
ControlResponse |
setStatusCode(int statusCode)
Set the status code.
|
ControlResponse |
setStatusText(String statusText)
Set the status text.
|
void |
wireDecode(Blob input)
Decode the input using the default wire format
WireFormat.getDefaultWireFormat() and update this ControlResponse.
|
void |
wireDecode(Blob input,
WireFormat wireFormat)
Decode the input using a particular wire format and update this ControlResponse.
|
void |
wireDecode(ByteBuffer input)
Decode the input using the default wire format
WireFormat.getDefaultWireFormat() and update this ControlResponse.
|
void |
wireDecode(ByteBuffer input,
WireFormat wireFormat)
Decode the input using a particular wire format and update this ControlResponse.
|
Blob |
wireEncode()
Encode this ControlResponse for the default wire format
WireFormat.getDefaultWireFormat().
|
Blob |
wireEncode(WireFormat wireFormat)
Encode this ControlResponse for a particular wire format.
|
public ControlResponse()
public ControlResponse(ControlResponse controlResponse)
controlResponse
- The ControlResponse to copy.public final Blob wireEncode(WireFormat wireFormat)
wireFormat
- A WireFormat object used to encode this ControlResponse.public final Blob wireEncode()
public final void wireDecode(ByteBuffer input, WireFormat wireFormat) throws EncodingException
input
- The input buffer to decode. This reads from position() to
limit(), but does not change the position.wireFormat
- A WireFormat object used to decode the input.EncodingException
- For invalid encoding.public final void wireDecode(ByteBuffer input) throws EncodingException
input
- The input buffer to decode. This reads from position() to
limit(), but does not change the position.EncodingException
- For invalid encoding.public final void wireDecode(Blob input, WireFormat wireFormat) throws EncodingException
input
- The input blob to decode.wireFormat
- A WireFormat object used to decode the input.EncodingException
- For invalid encoding.public final void wireDecode(Blob input) throws EncodingException
input
- The input blob to decode.EncodingException
- For invalid encoding.public final int getStatusCode()
public final String getStatusText()
public final ControlParameters getBodyAsControlParameters()
public final ControlResponse setStatusCode(int statusCode)
statusCode
- The status code. If not specified, set to -1.public final ControlResponse setStatusText(String statusText)
statusText
- The status text. If not specified, set to "".public final ControlResponse setBodyAsControlParameters(ControlParameters controlParameters)
controlParameters
- The ControlParameters for the body. This makes a
copy of the ControlParameters. If not specified or if the body is not a
ControlParameters, set to null.Copyright © 2016. All rights reserved.