public class Interaction extends Xholon implements IInteraction
FORMAT_NONE, FORMAT_PLANTUML, FORMAT_ROSE, FORMAT_SDEDIT, FORMAT_SDEDIT_SOCKET, FORMAT_UML_GRAPH, FORMAT_WEBSD, MAX_DATA_LEN, MAX_LIFELINES_STORED, MAX_MESSAGES_STORED, MAX_NAME_LEN
DEFAULT_SIZE_MSG_Q, DEFAULT_SIZE_SYSTEM_MSG_Q, GETNAME_DEFAULT, GETNAME_LOCALPART_ID, GETNAME_NOROLENAME, GETNAME_ROLENAME_OR_CLASSNAME, GETNAME_ROLENAMESEP_, GETNAME_SIZE_TEMPLATE, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx, XHOLON_ID_DEFAULT, XHOLON_ID_NULL
Constructor and Description |
---|
Interaction()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessage(IMessage msg)
Add a message to the interaction.
|
void |
addMessage(int signal,
java.lang.Object data,
IXholon sender,
IXholon receiver,
int index)
Add a message to the interaction.
|
void |
addState(IStateMachineEntity state)
Add a state to the sequence diagram, but only if getShowStates() == true.
|
void |
addSyncMessage(IMessage msg)
Add a Synchronous message to the interaction.
|
void |
createSequenceDiagram(java.lang.String modelName)
Create a sequence diagram from the interaction.
|
boolean |
getExcludeAdditionalSystemMessages()
Get whether or not to exclude additional system messages from the sequence diagram.
|
boolean |
getExcludeSystemMessages()
Get whether or not to exclude system messages from the sequence diagram.
|
int |
getMaxDataLen()
Get max length of msg.data contents to output.
|
int |
getMaxNameLen()
Get max length of a class or role name to output.
|
java.lang.String |
getName()
Get name, unique within this application, of this Xholon instance.
|
int |
getOutputFormat()
Get the output format.
|
IPortInterface |
getProvidedRequiredInterface()
Get an optional provided and/or required interface.
|
boolean |
getShowStates()
Get whether or not states will be shown on the sequence diagram.
|
java.lang.String |
getSocketHost()
Get the host for a socket connection, if using sdedit as a sequence diagram server.
|
int |
getSocketPort()
Get the port for a socket connection, if using sdedit as a sequence diagram server.
|
IXholonClass |
getXhc()
Get the IXholonClass to which this Xholon instance is a member.
|
java.lang.String |
getXhcName()
Get the name of the IXholonClass to which this Xholon instance is a member.
|
void |
processReceivedMessage(IMessage msg)
Process a received message taken from the message queue.
|
void |
setExcludeAdditionalSystemMessages(boolean excludeAdditionalSystemMessages)
Set whether or not to exclude additional system messages from the sequence diagram.
|
void |
setExcludeSystemMessages(boolean excludeSystemMessages)
Set whether or not to exclude system messages from the sequence diagram.
|
void |
setMaxDataLen(int maxDataLen)
Set max length of msg.data contents to output.
|
void |
setMaxNameLen(int maxNameLen)
Set max length of a class or role name to output.
|
void |
setOutputFormat(int outputFormat)
Set the output format.
|
void |
setProvidedRequiredInterface(IPortInterface providedRequiredInterface)
Set an optional provided and/or required interface.
|
void |
setShowStates(boolean showStates)
Set whether or not to show states on the sequence diagram.
|
void |
setSocketHost(java.lang.String socketHost)
Set the host for a socket connection, if using sdedit as a sequence diagram server.
|
void |
setSocketPort(int socketPort)
Set the port for a socket connection, if using sdedit as a sequence diagram server.
|
act, actNr, appendChild, appendChild, appendChild, appendsOwnChildren, bindPorts, cleanup, compareTo, configure, configure, consoleLog, decVal, decVal, depth, doAction, equals, findFirstChildWithXhClass, findFirstChildWithXhClass, forwardMessage, forwardSyncMessage, getActionList, getAllPorts, getAnnotation, getApp, getAttributeNodeXh, getAttributeXh, getChildNodes, getClassNode, getClassNode, getFactory, getFirstChild, getFirstSibling, getId, getInteraction, getInteractionsEnabled, getIQueueImplName, getLastChild, getLastSibling, getLogger, getMsgQ, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumLevels, getNumSiblings, getParentNode, getPort, getPort, getPreviousSibling, getRoleName, getRootNode, getSelfAndSiblings, getSelfAndSiblingsIndex, getService, getSiblings, getSystemMsgQ, getUid, getUri, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhcId, getXholon2Xml, getXhType, getXml2Xholon, getXPath, handleNodeSelection, handleNodeSelection, hasAncestor, hasAnnotation, hasAttributeXh, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, hasSiblingNodes, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertFirstChild, isActiveObject, isAttributeHandler, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, isUniqueSibling, isUniqueSiblingRoleName, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedSyncMessage, processSystemMessageQ, reconfigure, registerMessageForwardee, remove, removeAttributeNodeXh, removeAttributeXh, removeChild, replaceNode, searchForReferencingNodes, searchForReferencingNodesRecurse, sendMessage, sendMessage, sendMessage, sendSyncMessage, sendSyncMessage, sendSyncMessage, sendSystemMessage, sendSystemMessage, setActionList, setAnnotation, setApp, setAttributeNodeXh, setAttributeVal, setAttributeXh, setFirstChild, setId, setName, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPort, setPort, setPorts, setRoleName, setUid, setUri, setVal_boolean, setVal_byte, setVal_char, setVal_double, setVal_float, setVal_int, setVal_long, setVal_Object, setVal_short, setVal_String, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setXhc, showAnnotation, swapNode, terminate, toString, toXml, toXmlAttribute, toXmlAttributes, toXmlText, treeSize, visit
getClass, hashCode, notify, notifyAll, wait, wait, wait
act, actNr, appendChild, appendChild, appendChild, appendsOwnChildren, bindPorts, cleanup, configure, configure, consoleLog, decVal, decVal, depth, doAction, findFirstChildWithXhClass, findFirstChildWithXhClass, forwardMessage, forwardSyncMessage, getActionList, getAllPorts, getAnnotation, getApp, getAttributeNodeXh, getAttributeXh, getChildNodes, getClassNode, getClassNode, getFirstChild, getFirstSibling, getId, getLastChild, getLastSibling, getName, getNeighbors, getNextSibling, getNthChild, getNthSibling, getNumChildren, getNumLevels, getNumSiblings, getParentNode, getPort, getPort, getPreviousSibling, getRoleName, getRootNode, getSelfAndSiblings, getSelfAndSiblingsIndex, getService, getSiblings, getUid, getUri, getVal_boolean, getVal_byte, getVal_char, getVal_double, getVal_float, getVal_int, getVal_long, getVal_Object, getVal_short, getVal_String, getVal, getXhcId, getXholon2Xml, getXhType, getXml2Xholon, handleNodeSelection, handleNodeSelection, hasAncestor, hasAnnotation, hasAttributeXh, hasChildNodes, hasChildOrSiblingNodes, hasNextSibling, hasParentNode, hasSiblingNodes, height, incVal, incVal, initialize, initStatics, inOrderPrint, insertAfter, insertAfter, insertAfter, insertBefore, insertBefore, insertBefore, insertFirstChild, isActiveObject, isAttributeHandler, isBound, isContainer, isExternal, isInternal, isLeaf, isPassiveObject, isRootNode, isUniqueSibling, isUniqueSiblingRoleName, performActivity, performActivity, performBooleanActivity, performBooleanActivity, performDoubleActivity, performGuard, performVoidActivity, postAct, postConfigure, postOrderPrint, postReconfigure, preAct, preConfigure, preOrderPrint, preReconfigure, print, println, processMessageQ, processReceivedSyncMessage, processSystemMessageQ, reconfigure, registerMessageForwardee, remove, removeAttributeNodeXh, removeAttributeXh, removeChild, replaceNode, searchForReferencingNodes, sendMessage, sendMessage, sendMessage, sendSyncMessage, sendSyncMessage, sendSyncMessage, sendSystemMessage, sendSystemMessage, setActionList, setAnnotation, setApp, setAttributeNodeXh, setAttributeVal, setAttributeXh, setFirstChild, setId, setName, setNextSibling, setParentChildLinks, setParentNode, setParentSiblingLinks, setPort, setPort, setPorts, setRoleName, setUid, setUri, setVal_boolean, setVal_byte, setVal_char, setVal_double, setVal_float, setVal_int, setVal_long, setVal_Object, setVal_short, setVal_String, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setVal, setXhc, showAnnotation, swapNode, terminate, toXml, toXmlAttribute, toXmlAttributes, toXmlText, treeSize, visit
public IXholonClass getXhc()
IXholon
public java.lang.String getXhcName()
IXholon
getXhcName
in interface IXholon
getXhcName
in class Xholon
public java.lang.String getName()
IXholon
public void setOutputFormat(int outputFormat)
IInteraction
setOutputFormat
in interface IInteraction
outputFormat
- One of FORMAT_UML_GRAPH, FORMAT_SDEDIT, FORMAT_SDEDIT_SOCKET.public void setSocketHost(java.lang.String socketHost)
IInteraction
setSocketHost
in interface IInteraction
socketHost
- A valid socket host (ex: localhost).public void setSocketPort(int socketPort)
IInteraction
setSocketPort
in interface IInteraction
socketPort
- A valid socket port (ex: 60001).public void setShowStates(boolean showStates)
IInteraction
setShowStates
in interface IInteraction
showStates
- true or falsepublic void setExcludeSystemMessages(boolean excludeSystemMessages)
IInteraction
setExcludeSystemMessages
in interface IInteraction
excludeSystemMessages
- true or falsepublic void setExcludeAdditionalSystemMessages(boolean excludeAdditionalSystemMessages)
IInteraction
setExcludeAdditionalSystemMessages
in interface IInteraction
excludeAdditionalSystemMessages
- true or falsepublic void setMaxNameLen(int maxNameLen)
IInteraction
setMaxNameLen
in interface IInteraction
maxNameLen
- The maximum length of the name.public void setMaxDataLen(int maxDataLen)
IInteraction
setMaxDataLen
in interface IInteraction
maxDataLen
- The maximum length of the data.public void setProvidedRequiredInterface(IPortInterface providedRequiredInterface)
IInteraction
setProvidedRequiredInterface
in interface IInteraction
providedRequiredInterface
- A fully initialized instance of IPortInterface.public int getOutputFormat()
IInteraction
getOutputFormat
in interface IInteraction
public java.lang.String getSocketHost()
IInteraction
getSocketHost
in interface IInteraction
public int getSocketPort()
IInteraction
getSocketPort
in interface IInteraction
public boolean getShowStates()
IInteraction
getShowStates
in interface IInteraction
public boolean getExcludeSystemMessages()
IInteraction
getExcludeSystemMessages
in interface IInteraction
public boolean getExcludeAdditionalSystemMessages()
IInteraction
getExcludeAdditionalSystemMessages
in interface IInteraction
public int getMaxNameLen()
IInteraction
getMaxNameLen
in interface IInteraction
public int getMaxDataLen()
IInteraction
getMaxDataLen
in interface IInteraction
public IPortInterface getProvidedRequiredInterface()
IInteraction
getProvidedRequiredInterface
in interface IInteraction
public void addMessage(IMessage msg)
IInteraction
addMessage
in interface IInteraction
msg
- The message.public void addMessage(int signal, java.lang.Object data, IXholon sender, IXholon receiver, int index)
IInteraction
addMessage
in interface IInteraction
signal
- A signal that identifies the type of message.data
- Optional data carried by the message.sender
- The sender of the message.receiver
- The intended receiver of the message.index
- A port replication index.public void addSyncMessage(IMessage msg)
IInteraction
addSyncMessage
in interface IInteraction
msg
- The message.public void addState(IStateMachineEntity state)
IInteraction
addState
in interface IInteraction
state
- A state within a state machine.public void processReceivedMessage(IMessage msg)
IXholon
processReceivedMessage
in interface IInteraction
processReceivedMessage
in interface IXholon
processReceivedMessage
in class Xholon
msg
- The message that was received.org.primordion.xholon.base.IXholon#processReceivedMessage(org.primordion.xholon.base.Message)
public void createSequenceDiagram(java.lang.String modelName)
IInteraction
createSequenceDiagram
in interface IInteraction
modelName
- The name of this model.