net.named_data.jndn
public class ControlParameters extends Object
Constructor and Description |
---|
ControlParameters()
Create a new ControlParameters where all values are unspecified.
|
ControlParameters(ControlParameters controlParameters)
Create a new ControlParameters as a deep copy of the given controlParameters.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear fields and reset to default values.
|
boolean |
equals(Object other) |
int |
getCost() |
double |
getExpirationPeriod() |
int |
getFaceId() |
ForwardingFlags |
getForwardingFlags() |
int |
getLocalControlFeature() |
Name |
getName()
Get the name.
|
int |
getOrigin() |
Name |
getStrategy() |
String |
getUri() |
ControlParameters |
setCost(int cost)
Set the cost value.
|
ControlParameters |
setExpirationPeriod(double expirationPeriod)
Set the expiration period.
|
ControlParameters |
setFaceId(int faceId)
Set the Face ID.
|
ControlParameters |
setForwardingFlags(ForwardingFlags forwardingFlags)
Set the ForwardingFlags object to a copy of forwardingFlags.
|
ControlParameters |
setLocalControlFeature(int localControlFeature)
Set the local control feature value.
|
ControlParameters |
setName(Name name)
Set the name.
|
ControlParameters |
setOrigin(int origin)
Set the origin value.
|
ControlParameters |
setStrategy(Name strategy)
Set the strategy to a copy of the given Name.
|
ControlParameters |
setUri(String uri)
Set the URI.
|
void |
wireDecode(Blob input)
Decode the input using the default wire format
WireFormat.getDefaultWireFormat() and update this ControlParameters.
|
void |
wireDecode(Blob input,
WireFormat wireFormat)
Decode the input using a particular wire format and update this ControlParameters.
|
void |
wireDecode(ByteBuffer input)
Decode the input using the default wire format
WireFormat.getDefaultWireFormat() and update this ControlParameters.
|
void |
wireDecode(ByteBuffer input,
WireFormat wireFormat)
Decode the input using a particular wire format and update this ControlParameters.
|
Blob |
wireEncode()
Encode this ControlParameters for the default wire format
WireFormat.getDefaultWireFormat().
|
Blob |
wireEncode(WireFormat wireFormat)
Encode this ControlParameters for a particular wire format.
|
public ControlParameters()
public ControlParameters(ControlParameters controlParameters)
controlParameters
- The ControlParameters to copy.public final Blob wireEncode(WireFormat wireFormat)
wireFormat
- A WireFormat object used to encode this ControlParameters.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 Name getName()
public final int getFaceId()
public final String getUri()
public final int getLocalControlFeature()
public final int getOrigin()
public final int getCost()
public final ForwardingFlags getForwardingFlags()
public final Name getStrategy()
public final double getExpirationPeriod()
public final ControlParameters setName(Name name)
name
- The name. If not specified, set to null. If specified, this
makes a copy of the name.public final ControlParameters setFaceId(int faceId)
faceId
- The new face ID, or -1 for not specified.public final ControlParameters setUri(String uri)
uri
- The new uri, or an empty string for not specified.public final ControlParameters setLocalControlFeature(int localControlFeature)
localControlFeature
- The new local control feature value, or -1 for
not specified.public final ControlParameters setOrigin(int origin)
origin
- The new origin value, or -1 for not specified.public final ControlParameters setCost(int cost)
cost
- The new cost value, or -1 for not specified.public final ControlParameters setForwardingFlags(ForwardingFlags forwardingFlags)
forwardingFlags
- The new cost value, or null for not specified.public final ControlParameters setStrategy(Name strategy)
strategy
- The Name to copy, or an empty Name if not specified.public final ControlParameters setExpirationPeriod(double expirationPeriod)
expirationPeriod
- The expiration period in milliseconds, or
null for not specified.public final void clear()
Copyright © 2016. All rights reserved.