
public final class Message extends Object implements Serializable, Comparable<Message>
| Modifier and Type | Class and Description |
|---|---|
static class |
Message.MappingRelationDelOperationIterator |
static class |
Message.MappingRelationDoOperationIterator |
static class |
Message.MappingRelationGetOperationIterator |
static class |
Message.MappingRelationOperationIterator |
static class |
Message.MappingRelationPushOperationIterator |
static class |
Message.MappingRelationSetOperationIterator |
| Modifier | Constructor and Description |
|---|---|
protected |
Message(MessageCollection messageCollection,
XdiEntity xdiEntity) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Message other) |
DelOperation |
createDelOperation(Graph targetGraph)
Creates a new $del operation and adds it to this XDI message.
|
DelOperation |
createDelOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
Creates a new $del operation and adds it to this XDI message.
|
DelOperation |
createDelOperation(XDIAddress targetXDIAddress)
Creates a new $del operation and adds it to this XDI message.
|
DelOperation |
createDelOperation(XDIStatement targetXDIStatement)
Creates a new $del operation and adds it to this XDI message.
|
DoOperation |
createDoOperation(Graph targetGraph)
Creates a new $do operation and adds it to this XDI message.
|
DoOperation |
createDoOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
Creates a new $do operation and adds it to this XDI message.
|
DoOperation |
createDoOperation(XDIAddress targetXDIAddress)
Creates a new $do operation and adds it to this XDI message.
|
DoOperation |
createDoOperation(XDIStatement targetXDIStatement)
Creates a new $do operation and adds it to this XDI message.
|
GetOperation |
createGetOperation(Graph targetGraph)
Creates a new $get operation and adds it to this XDI message.
|
GetOperation |
createGetOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
Creates a new $get operation and adds it to this XDI message.
|
GetOperation |
createGetOperation(XDIAddress targetXDIAddress)
Creates a new $get operation and adds it to this XDI message.
|
GetOperation |
createGetOperation(XDIStatement targetXDIStatement)
Creates a new $get operation and adds it to this XDI message.
|
Operation |
createOperation(XDIAddress operationXDIAddress,
Graph targetGraph)
Creates a new operation and adds it to this XDI message.
|
Operation |
createOperation(XDIAddress operationXDIAddress,
Iterator<XDIStatement> targetXDIStatementAddresses)
Creates a new operation and adds it to this XDI message.
|
Operation |
createOperation(XDIAddress operationXDIAddress,
String target)
Creates a new operation and adds it to this XDI message.
|
Operation |
createOperation(XDIAddress operationXDIAddress,
XDIAddress targetXDIAddress)
Creates a new operation and adds it to this XDI message.
|
Operation |
createOperation(XDIAddress operationXDIAddress,
XDIStatement targetXDIStatementAddress)
Creates a new operation and adds it to this XDI message.
|
PushOperation |
createPushOperation(Graph targetGraph)
Creates a new $push operation and adds it to this XDI message.
|
PushOperation |
createPushOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
Creates a new $push operation and adds it to this XDI message.
|
PushOperation |
createPushOperation(XDIAddress targetXDIAddress)
Creates a new $push operation and adds it to this XDI message.
|
PushOperation |
createPushOperation(XDIStatement targetXDIStatement)
Creates a new $push operation and adds it to this XDI message.
|
SetOperation |
createSetOperation(Graph targetGraph)
Creates a new $set operation and adds it to this XDI message.
|
SetOperation |
createSetOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
Creates a new $set operation and adds it to this XDI message.
|
SetOperation |
createSetOperation(XDIAddress targetXDIAddress)
Creates a new $set operation and adds it to this XDI message.
|
SetOperation |
createSetOperation(XDIStatement targetXDIStatement)
Creates a new $set operation and adds it to this XDI message.
|
Signature<? extends Key,? extends Key> |
createSignature(String digestAlgorithm,
int digestLength,
String keyAlgorithm,
int keyLength,
boolean singleton)
Sets a signature on the message.
|
void |
deleteOperations()
Deletes all operations from this message.
|
void |
delMessageType(XDIAddress type) |
void |
delMessageTypes() |
boolean |
equals(Object object) |
static Message |
fromMessageCollectionAndXdiEntity(MessageCollection messageCollection,
XdiEntity xdiEntity)
Factory method that creates an XDI message bound to a given XDI entity.
|
ContextNode |
getContextNode()
Returns the underlying context node to which this XDI message is bound.
|
ReadOnlyIterator<DelOperation> |
getDelOperations()
Returns all XDI $del operations in this XDI message.
|
ReadOnlyIterator<DoOperation> |
getDoOperations()
Returns all XDI $do operations in this XDI message.
|
XDIArc |
getFromPeerRootXDIArc()
Return the FROM peer root arc.
|
ReadOnlyIterator<GetOperation> |
getGetOperations()
Returns all XDI $get operations in this XDI message.
|
XDIArc |
getID()
Returns the ID of the message.
|
XDIAddress |
getLinkContractXDIAddress()
Returns the link contract address.
|
MessageCollection |
getMessageCollection()
Returns the XDI message collection to which this XDI message belongs.
|
MessageEnvelope |
getMessageEnvelope()
Returns the message envelope to which this message belongs.
|
XDIAddress |
getMessageType() |
Iterator<XDIAddress> |
getMessageTypes() |
long |
getOperationCount()
Returns the number of XDI operations in this XDI message.
|
ReadOnlyIterator<Operation> |
getOperations()
Returns all XDI operations in this XDI message.
|
ReadOnlyIterator<Operation> |
getOperations(XDIAddress operationXDIAddress)
Returns all XDI operations with a given operation address in this XDI message.
|
ContextNode |
getOperationsContextNode()
Returns the context node with XDI operations.
|
XdiEntity |
getOperationsXdiEntity()
Returns the XDI entity with XDI operations.
|
PolicyRoot |
getPolicyRoot(boolean create)
Returns an existing XDI root policy in this XDI messages, or creates a new one.
|
ReadOnlyIterator<PushOperation> |
getPushOperations()
Returns all XDI $push operations in this XDI message.
|
String |
getSecretToken()
Returns the secret token from the message.
|
ContextNode |
getSender()
Returns the sender of the message's message collection.
|
XDIAddress |
getSenderXDIAddress()
Returns the sender address of the message's message collection.
|
ReadOnlyIterator<SetOperation> |
getSetOperations()
Returns all XDI $set operations in this XDI message.
|
ReadOnlyIterator<Signature<?,?>> |
getSignatures()
Returns the signature from the message.
|
Date |
getTimestamp()
Returns the timestamp.
|
XDIArc |
getToPeerRootXDIArc()
Return the TO peer root arc of the message.
|
XDIAddress |
getToXDIAddress()
Return the TO address of the message.
|
XdiEntity |
getXdiEntity()
Returns the underlying XDI entity to which this XDI message is bound.
|
int |
hashCode() |
boolean |
isMessageType(XDIAddress type) |
static boolean |
isValid(XdiEntity xdiEntity)
Checks if an XDI entity is a valid XDI message.
|
void |
replaceMessageType(XDIAddress type) |
void |
setFromPeerRootXDIArc(XDIArc fromPeerRootXDIArc)
Set the FROM peer root arc.
|
void |
setLinkContract(Class<? extends LinkContract> clazz)
Set a link contract class.
|
void |
setLinkContractXDIAddress(XDIAddress linkContractXDIAddress)
Set the link contract address.
|
void |
setMessageType(XDIAddress type) |
void |
setSecretToken(String secretToken)
Set a secret token on the message.
|
void |
setTimestamp(Date timestamp)
Set the timestamp.
|
void |
setToPeerRootXDIArc(XDIArc toPeerRootXDIArc)
Set the TO peer root arc of the message.
|
void |
setToXDIAddress(XDIAddress toXDIAddress)
Set the TO address of the message.
|
String |
toString() |
protected Message(MessageCollection messageCollection, XdiEntity xdiEntity)
public static boolean isValid(XdiEntity xdiEntity)
xdiEntity - The XDI entity to check.public static Message fromMessageCollectionAndXdiEntity(MessageCollection messageCollection, XdiEntity xdiEntity)
messageCollection - The XDI message collection to which this XDI message belongs.xdiEntity - The XDI entity that is an XDI message.public MessageCollection getMessageCollection()
public MessageEnvelope getMessageEnvelope()
public XdiEntity getXdiEntity()
public ContextNode getContextNode()
public XDIArc getID()
public ContextNode getSender()
public XDIAddress getSenderXDIAddress()
public XDIArc getFromPeerRootXDIArc()
public void setFromPeerRootXDIArc(XDIArc fromPeerRootXDIArc)
public XDIArc getToPeerRootXDIArc()
public XDIAddress getToXDIAddress()
public void setToPeerRootXDIArc(XDIArc toPeerRootXDIArc)
public void setToXDIAddress(XDIAddress toXDIAddress)
public Date getTimestamp()
public void setTimestamp(Date timestamp)
public XDIAddress getLinkContractXDIAddress()
public void setLinkContractXDIAddress(XDIAddress linkContractXDIAddress)
public void setLinkContract(Class<? extends LinkContract> clazz)
public PolicyRoot getPolicyRoot(boolean create)
create - Whether to create an XDI root policy if it does not exist.public void setSecretToken(String secretToken)
secretToken - The secret token to set.public String getSecretToken()
public ReadOnlyIterator<Signature<?,?>> getSignatures()
public Signature<? extends Key,? extends Key> createSignature(String digestAlgorithm, int digestLength, String keyAlgorithm, int keyLength, boolean singleton)
public Iterator<XDIAddress> getMessageTypes()
public XDIAddress getMessageType()
public boolean isMessageType(XDIAddress type)
public void setMessageType(XDIAddress type)
public void delMessageType(XDIAddress type)
public void delMessageTypes()
public void replaceMessageType(XDIAddress type)
public XdiEntity getOperationsXdiEntity()
public ContextNode getOperationsContextNode()
public Operation createOperation(XDIAddress operationXDIAddress, XDIAddress targetXDIAddress)
operationXDIAddress - The operation address to use for the new operation.targetXDIAddress - The target address to which the operation applies.public Operation createOperation(XDIAddress operationXDIAddress, Iterator<XDIStatement> targetXDIStatementAddresses)
operationXDIAddress - The operation address to use for the new operation.targetXDIStatementAddresses - The target statements to which the operation applies.public Operation createOperation(XDIAddress operationXDIAddress, XDIStatement targetXDIStatementAddress)
operationXDIAddress - The operation address to use for the new operation.targetXDIStatementAddress - The target statement to which the operation applies.public Operation createOperation(XDIAddress operationXDIAddress, Graph targetGraph)
operationXDIAddress - The operation address to use for the new operation.targetGraph - The target graph with statements to which this operation applies.public Operation createOperation(XDIAddress operationXDIAddress, String target)
operationXDIAddress - The operation address to use for the new operation.target - The target address or target statement to which the operation applies.public GetOperation createGetOperation(XDIAddress targetXDIAddress)
targetXDIAddress - The target address to which the operation applies.public GetOperation createGetOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
targetXDIStatementAddresses - The target statements to which the operation applies.public GetOperation createGetOperation(XDIStatement targetXDIStatement)
targetXDIStatement - The target statement to which the operation applies.public GetOperation createGetOperation(Graph targetGraph)
targetGraph - The target graph with statements to which this operation applies.public SetOperation createSetOperation(XDIAddress targetXDIAddress)
targetXDIAddress - The target address to which the operation applies.public SetOperation createSetOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
targetXDIStatementAddresses - The target statements to which the operation applies.public SetOperation createSetOperation(XDIStatement targetXDIStatement)
targetXDIStatement - The target statement to which the operation applies.public SetOperation createSetOperation(Graph targetGraph)
targetGraph - The target graph with statements to which this operation applies.public DelOperation createDelOperation(XDIAddress targetXDIAddress)
targetXDIAddress - The target address to which the operation applies.public DelOperation createDelOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
targetXDIStatementAddresses - The target statements to which the operation applies.public DelOperation createDelOperation(XDIStatement targetXDIStatement)
targetXDIStatement - The target statement to which the operation applies.public DelOperation createDelOperation(Graph targetGraph)
targetGraph - The target graph with statements to which this operation applies.public PushOperation createPushOperation(XDIAddress targetXDIAddress)
targetXDIAddress - The target address to which the operation applies.public PushOperation createPushOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
targetXDIStatementAddresses - The target statements to which the operation applies.public PushOperation createPushOperation(XDIStatement targetXDIStatement)
targetXDIStatement - The target statement to which the operation applies.public PushOperation createPushOperation(Graph targetGraph)
targetGraph - The target graph with statements to which this operation applies.public DoOperation createDoOperation(XDIAddress targetXDIAddress)
targetXDIAddress - The target address to which the operation applies.public DoOperation createDoOperation(Iterator<XDIStatement> targetXDIStatementAddresses)
targetXDIStatementAddresses - The target statements to which the operation applies.public DoOperation createDoOperation(XDIStatement targetXDIStatement)
targetXDIStatement - The target statement to which the operation applies.public DoOperation createDoOperation(Graph targetGraph)
targetGraph - The target graph with statements to which this operation applies.public ReadOnlyIterator<Operation> getOperations()
public ReadOnlyIterator<Operation> getOperations(XDIAddress operationXDIAddress)
public ReadOnlyIterator<GetOperation> getGetOperations()
public ReadOnlyIterator<SetOperation> getSetOperations()
public ReadOnlyIterator<DelOperation> getDelOperations()
public ReadOnlyIterator<PushOperation> getPushOperations()
public ReadOnlyIterator<DoOperation> getDoOperations()
public void deleteOperations()
public long getOperationCount()
public int compareTo(Message other)
compareTo in interface Comparable<Message>Copyright © 2015. All Rights Reserved.