net.named_data.jndn
public class Link extends Data
Constructor and Description |
---|
Link()
Create a Link with default values and where the list of delegations is
empty and the meta info type is LINK.
|
Link(Data data)
Create a Link, copying values from the other Data object.
|
Link(Name name)
Create a Link with the given name and default values and where the list of
delegations is empty and the meta info type is LINK.
|
Modifier and Type | Method and Description |
---|---|
Link |
addDelegation(int preference,
Name name)
Add a new delegation to the list of delegations, sorted by
preference number then by name.
|
Link |
addDelegation(int preference,
Name name,
WireFormat wireFormat)
Add a new delegation to the list of delegations, sorted by
preference number then by name.
|
DelegationSet |
getDelegations()
Get the list of delegation for read only.
|
boolean |
removeDelegation(Name name)
Remove every delegation with the given name.
|
boolean |
removeDelegation(Name name,
WireFormat wireFormat)
Remove every delegation with the given name.
|
void |
wireDecode(Blob input,
WireFormat wireFormat)
Override to call the base class wireDecode then populate the list of
delegations from the content.
|
getChangeCount, getContent, getDefaultWireEncoding, getIncomingFaceId, getMetaInfo, getName, getSignature, setContent, setMetaInfo, setName, setSignature, wireDecode, wireDecode, wireDecode, wireEncode, wireEncode
public Link()
public Link(Name name)
name
- The name which is copied.public Link(Data data)
data
- The Data object to copy values from.public void wireDecode(Blob input, WireFormat wireFormat) throws EncodingException
wireDecode
in class Data
input
- The input byte array to be decoded as an immutable Blob.wireFormat
- A WireFormat object used to decode the input.EncodingException
- For invalid encoding.public final Link addDelegation(int preference, Name name, WireFormat wireFormat)
preference
- The preference number.name
- The delegation name. This makes a copy of the name. If there
is already a delegation with the same name, this updates its preference.wireFormat
- A WireFormat object used to encode the DelegationSet.public final Link addDelegation(int preference, Name name)
preference
- The preference number.name
- The delegation name. This makes a copy of the name. If there
is already a delegation with the same name, this updates its preference.public final boolean removeDelegation(Name name, WireFormat wireFormat)
name
- Then name to match the name of the delegation(s) to be removed.wireFormat
- A WireFormat object used to encode the DelegationSet.public final boolean removeDelegation(Name name)
name
- Then name to match the name of the delegation(s) to be removed.public final DelegationSet getDelegations()
Copyright © 2016. All rights reserved.