public abstract class MessageBase<N extends XdiEntity> extends Object implements Serializable, Comparable<MessageBase<N>>
Modifier and Type | Class and Description |
---|---|
static class |
MessageBase.MappingRelationConnectOperationIterator |
static class |
MessageBase.MappingRelationDelOperationIterator |
static class |
MessageBase.MappingRelationDoOperationIterator |
static class |
MessageBase.MappingRelationGetOperationIterator |
static class |
MessageBase.MappingRelationOperationIterator |
static class |
MessageBase.MappingRelationPushOperationIterator |
static class |
MessageBase.MappingRelationSendOperationIterator |
static class |
MessageBase.MappingRelationSetOperationIterator |
Constructor and Description |
---|
MessageBase() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MessageBase<N> other) |
ConnectOperation |
createConnectOperation(Graph targetGraph)
Creates a new $connect operation and adds it to this XDI message (template).
|
ConnectOperation |
createConnectOperation(Iterator<XDIStatement> targetXDIStatements)
Creates a new $connect operation and adds it to this XDI message (template).
|
ConnectOperation |
createConnectOperation(XDIAddress targetXDIAddress)
Creates a new $connect operation and adds it to this XDI message (template).
|
ConnectOperation |
createConnectOperation(XDIStatement targetXDIStatement)
Creates a new $connect operation and adds it to this XDI message (template).
|
DelOperation |
createDelOperation(Graph targetGraph)
Creates a new $del operation and adds it to this XDI message (template).
|
DelOperation |
createDelOperation(Iterator<XDIStatement> targetXDIStatements)
Creates a new $del operation and adds it to this XDI message (template).
|
DelOperation |
createDelOperation(XDIAddress targetXDIAddress)
Creates a new $del operation and adds it to this XDI message (template).
|
DelOperation |
createDelOperation(XDIStatement targetXDIStatement)
Creates a new $del operation and adds it to this XDI message (template).
|
DoOperation |
createDoOperation(Graph targetGraph)
Creates a new $do operation and adds it to this XDI message (template).
|
DoOperation |
createDoOperation(Iterator<XDIStatement> targetXDIStatements)
Creates a new $do operation and adds it to this XDI message (template).
|
DoOperation |
createDoOperation(XDIAddress targetXDIAddress)
Creates a new $do operation and adds it to this XDI message (template).
|
DoOperation |
createDoOperation(XDIStatement targetXDIStatement)
Creates a new $do operation and adds it to this XDI message (template).
|
GetOperation |
createGetOperation(Graph targetGraph)
Creates a new $get operation and adds it to this XDI message (template).
|
GetOperation |
createGetOperation(Iterator<XDIStatement> targetXDIStatements)
Creates a new $get operation and adds it to this XDI message (template).
|
GetOperation |
createGetOperation(XDIAddress targetXDIAddress)
Creates a new $get operation and adds it to this XDI message (template).
|
GetOperation |
createGetOperation(XDIStatement targetXDIStatement)
Creates a new $get operation and adds it to this XDI message (template).
|
XdiInnerRoot |
createMessageDeferredPushResult(Graph messagePushResultGraph)
Creates a new message push result and adds it to this XDI message (template).
|
Operation |
createOperation(XDIAddress operationXDIAddress,
Graph targetGraph)
Creates a new operation and adds it to this XDI message (template).
|
Operation |
createOperation(XDIAddress operationXDIAddress,
Iterator<XDIStatement> targetXDIStatements)
Creates a new operation and adds it to this XDI message (template).
|
Operation |
createOperation(XDIAddress operationXDIAddress,
String target)
Creates a new operation and adds it to this XDI message (template).
|
Operation |
createOperation(XDIAddress operationXDIAddress,
XDIAddress targetXDIAddress)
Creates a new operation and adds it to this XDI message (template).
|
Operation |
createOperation(XDIAddress operationXDIAddress,
XDIStatement targetXDIStatementAddress)
Creates a new operation and adds it to this XDI message (template).
|
XdiInnerRoot |
createOperationResult(XDIAddress operationXDIAddress,
Graph resultGraph)
Creates a new operation result and adds it to this XDI message (template).
|
PushOperation |
createPushOperation(Graph targetGraph)
Creates a new $push operation and adds it to this XDI message (template).
|
PushOperation |
createPushOperation(Iterator<XDIStatement> targetXDIStatements)
Creates a new $push operation and adds it to this XDI message (template).
|
PushOperation |
createPushOperation(Message message)
Creates a new $push operation and adds it to this XDI message (template).
|
PushOperation |
createPushOperation(XDIAddress targetXDIAddress)
Creates a new $push operation and adds it to this XDI message (template).
|
PushOperation |
createPushOperation(XDIStatement targetXDIStatement)
Creates a new $push operation and adds it to this XDI message (template).
|
SendOperation |
createSendOperation(Graph targetGraph)
Creates a new $send operation and adds it to this XDI message (template).
|
SendOperation |
createSendOperation(Iterator<XDIStatement> targetXDIStatements)
Creates a new $send operation and adds it to this XDI message (template).
|
SendOperation |
createSendOperation(Message message)
Creates a new $send operation and adds it to this XDI message (template).
|
SendOperation |
createSendOperation(XDIAddress targetXDIAddress)
Creates a new $send operation and adds it to this XDI message (template).
|
SendOperation |
createSendOperation(XDIStatement targetXDIStatement)
Creates a new $send operation and adds it to this XDI message (template).
|
SetOperation |
createSetOperation(Graph targetGraph)
Creates a new $set operation and adds it to this XDI message (template).
|
SetOperation |
createSetOperation(Iterator<XDIStatement> targetXDIStatements)
Creates a new $set operation and adds it to this XDI message (template).
|
SetOperation |
createSetOperation(XDIAddress targetXDIAddress)
Creates a new $set operation and adds it to this XDI message (template).
|
SetOperation |
createSetOperation(XDIStatement targetXDIStatement)
Creates a new $set operation and adds it to this XDI message (template).
|
Signature |
createSignature(String digestAlgorithm,
Integer digestLength,
String keyAlgorithm,
Integer keyLength,
boolean singleton)
Sets a signature on the message (template).
|
void |
deleteOperations()
Deletes all operations from this message.
|
void |
delMessageType(XDIAddress messageType) |
void |
delMessageTypes() |
boolean |
equals(Object object) |
static MessageBase<?> |
fromXdiEntity(XdiEntity xdiEntity)
Factory method that creates an XDI message (template) bound to a given XDI entity.
|
ReadOnlyIterator<ConnectOperation> |
getConnectOperations()
Returns all XDI $connect operations in this XDI message (template).
|
ContextNode |
getContextNode()
Returns the underlying context node to which this XDI message (template) is bound.
|
XDIAddress |
getCorrelationXDIAddress()
Get this message (template)'s correlation to another message (template).
|
ReadOnlyIterator<DelOperation> |
getDelOperations()
Returns all XDI $del operations in this XDI message (template).
|
ReadOnlyIterator<Digest> |
getDigests()
Returns the digests from the message (template).
|
ReadOnlyIterator<DoOperation> |
getDoOperations()
Returns all XDI $do operations in this XDI message (template).
|
XDIArc |
getFromPeerRootXDIArc()
Return the FROM peer root arc of the message (template).
|
XDIAddress |
getFromXDIAddress()
Return the FROM address of the message (template).
|
ReadOnlyIterator<GetOperation> |
getGetOperations()
Returns all XDI $get operations in this XDI message (template).
|
XDIAddress |
getLinkContractXDIAddress()
Returns the link contract address.
|
XdiInnerRoot |
getMessageDeferredPushResult() |
XDIAddress |
getMessageType() |
Iterator<XDIAddress> |
getMessageTypes() |
long |
getOperationCount()
Returns the number of XDI operations in this XDI message (template).
|
ReadOnlyIterator<XdiInnerRoot> |
getOperationResults() |
ReadOnlyIterator<Operation> |
getOperations()
Returns all XDI operations in this XDI message (template).
|
ContextNode |
getOperationsContextNode()
Returns the context node with XDI operations.
|
XdiEntity |
getOperationsXdiEntity()
Returns the XDI entity with XDI operations.
|
Object |
getParameter(XDIAddress parameterXDIAddress)
Returns a parameter value of this message (template).
|
Boolean |
getParameterBoolean(XDIAddress parameterXDIAddress)
Returns a parameter value boolean of this message (template).
|
Number |
getParameterNumber(XDIAddress parameterXDIAddress)
Returns a parameter value number of this message (template).
|
String |
getParameterString(XDIAddress parameterXDIAddress)
Returns a parameter value string of this message (template).
|
PolicyRoot |
getPolicyRoot(boolean create)
Returns an existing XDI root policy in this XDI message (template), or creates a new one.
|
ReadOnlyIterator<PushOperation> |
getPushOperations()
Returns all XDI $push operations in this XDI message (template).
|
String |
getSecretToken()
Returns the secret token from the message (template).
|
ReadOnlyIterator<SendOperation> |
getSendOperations()
Returns all XDI $send operations in this XDI message (template).
|
ReadOnlyIterator<SetOperation> |
getSetOperations()
Returns all XDI $set operations in this XDI message (template).
|
ReadOnlyIterator<Signature> |
getSignatures()
Returns the signatures from the message (template).
|
Date |
getTimestamp()
Returns the timestamp.
|
XDIArc |
getToPeerRootXDIArc()
Return the TO peer root arc of the message (template).
|
XDIAddress |
getToXDIAddress()
Return the TO address of the message (template).
|
abstract N |
getXdiSubGraph() |
int |
hashCode() |
boolean |
isMessageType(XDIAddress messageType) |
static boolean |
isValid(XdiEntity xdiEntity)
Checks if an XDI entity is a valid XDI message (template).
|
void |
replaceMessageType(XDIAddress messageType) |
void |
setCorrelationXDIAddress(XDIAddress correlationXDIAddress)
Set this message (template)'s correlation to another message (template).
|
void |
setFromPeerRootXDIArc(XDIArc fromPeerRootXDIArc)
Set the FROM peer root arc of the message (template).
|
void |
setFromXDIAddress(XDIAddress fromXDIAddress)
Set the FROM address of the message (template).
|
void |
setLinkContract(LinkContract linkContract)
Set the link contract.
|
void |
setLinkContractClass(Class<? extends LinkContract> clazz)
Set the link contract class.
|
void |
setLinkContractXDIAddress(XDIAddress linkContractXDIAddress)
Set the link contract address.
|
void |
setMessageType(XDIAddress messageType) |
void |
setParameter(XDIAddress parameterXDIAddress,
Object parameterValue)
Sets a parameter value of this message (template).
|
void |
setSecretToken(String secretToken)
Set a secret token on the message (template).
|
void |
setTimestamp(Date timestamp)
Set the timestamp.
|
void |
setToPeerRootXDIArc(XDIArc toPeerRootXDIArc)
Set the TO peer root arc of the message (template).
|
void |
setToXDIAddress(XDIAddress toXDIAddress)
Set the TO address of the message (template).
|
String |
toString() |
public static boolean isValid(XdiEntity xdiEntity)
xdiEntity
- The XDI entity to check.public static MessageBase<?> fromXdiEntity(XdiEntity xdiEntity)
xdiEntity
- The XDI entity that is an XDI message (template).public abstract N getXdiSubGraph()
public ContextNode getContextNode()
public XDIArc getFromPeerRootXDIArc()
public XDIAddress getFromXDIAddress()
public void setFromPeerRootXDIArc(XDIArc fromPeerRootXDIArc)
public void setFromXDIAddress(XDIAddress fromXDIAddress)
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(LinkContract linkContract)
public void setLinkContractClass(Class<? extends LinkContract> clazz)
public PolicyRoot getPolicyRoot(boolean create)
create
- Whether to create an XDI root policy if it does not exist.public void setCorrelationXDIAddress(XDIAddress correlationXDIAddress)
public XDIAddress getCorrelationXDIAddress()
public void setParameter(XDIAddress parameterXDIAddress, Object parameterValue)
parameterXDIAddress
- The parameter identifier.parameterValue
- The parameter value.public Object getParameter(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public String getParameterString(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public Number getParameterNumber(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public Boolean getParameterBoolean(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public void setSecretToken(String secretToken)
secretToken
- The secret token to set.public String getSecretToken()
public ReadOnlyIterator<Signature> getSignatures()
public ReadOnlyIterator<Digest> getDigests()
public Signature createSignature(String digestAlgorithm, Integer digestLength, String keyAlgorithm, Integer keyLength, boolean singleton)
public Iterator<XDIAddress> getMessageTypes()
public XDIAddress getMessageType()
public boolean isMessageType(XDIAddress messageType)
public void setMessageType(XDIAddress messageType)
public void delMessageType(XDIAddress messageType)
public void delMessageTypes()
public void replaceMessageType(XDIAddress messageType)
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> targetXDIStatements)
operationXDIAddress
- The operation address to use for the new operation.targetXDIStatements
- 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> targetXDIStatements)
targetXDIStatements
- 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> targetXDIStatements)
targetXDIStatements
- 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> targetXDIStatements)
targetXDIStatements
- 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 ConnectOperation createConnectOperation(XDIAddress targetXDIAddress)
targetXDIAddress
- The target address to which the operation applies.public ConnectOperation createConnectOperation(Iterator<XDIStatement> targetXDIStatements)
targetXDIStatements
- The target statements to which the operation applies.public ConnectOperation createConnectOperation(XDIStatement targetXDIStatement)
targetXDIStatement
- The target statement to which the operation applies.public ConnectOperation createConnectOperation(Graph targetGraph)
targetGraph
- The target graph with statements to which this operation applies.public SendOperation createSendOperation(XDIAddress targetXDIAddress)
targetXDIAddress
- The target address to which the operation applies.public SendOperation createSendOperation(Iterator<XDIStatement> targetXDIStatements)
targetXDIStatements
- The target statements to which the operation applies.public SendOperation createSendOperation(XDIStatement targetXDIStatement)
targetXDIStatement
- The target statement to which the operation applies.public SendOperation createSendOperation(Graph targetGraph)
targetGraph
- The target graph with statements to which this operation applies.public SendOperation createSendOperation(Message message)
message
- The inner message of this operation.public PushOperation createPushOperation(XDIAddress targetXDIAddress)
targetXDIAddress
- The target address to which the operation applies.public PushOperation createPushOperation(Iterator<XDIStatement> targetXDIStatements)
targetXDIStatements
- 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 PushOperation createPushOperation(Message message)
message
- The inner message of this operation.public DoOperation createDoOperation(XDIAddress targetXDIAddress)
targetXDIAddress
- The target address to which the operation applies.public DoOperation createDoOperation(Iterator<XDIStatement> targetXDIStatements)
targetXDIStatements
- 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 XdiInnerRoot createMessageDeferredPushResult(Graph messagePushResultGraph)
messagePushResultGraph
- The message push result graph to add to this XDI message (template).public XdiInnerRoot getMessageDeferredPushResult()
public XdiInnerRoot createOperationResult(XDIAddress operationXDIAddress, Graph resultGraph)
operationXDIAddress
- The operation address to use for the new operation result.resultGraph
- The result graph to add to this XDI message (template).public ReadOnlyIterator<XdiInnerRoot> getOperationResults()
public ReadOnlyIterator<Operation> getOperations()
public ReadOnlyIterator<GetOperation> getGetOperations()
public ReadOnlyIterator<SetOperation> getSetOperations()
public ReadOnlyIterator<DelOperation> getDelOperations()
public ReadOnlyIterator<ConnectOperation> getConnectOperations()
public ReadOnlyIterator<SendOperation> getSendOperations()
public ReadOnlyIterator<PushOperation> getPushOperations()
public ReadOnlyIterator<DoOperation> getDoOperations()
public void deleteOperations()
public long getOperationCount()
public int compareTo(MessageBase<N> other)
compareTo
in interface Comparable<MessageBase<N extends XdiEntity>>
Copyright © 2017. All rights reserved.