|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
IPort defines the abstract services that ports provide. A port is a window into the world external to its owning xholon, or to some part or parts of the xholon. A port has three basic responsibilites: (1) Locate other xholons with which this xholon can interact and establish one-way links, (2) Send messages from a sender xholon to one or more receiver xholons through a link, (3) Know what message types can be sent and received across a particular link and optionally use this knowledge to validate and restrict link establishment and/or message traffic.
Field Summary | |
static int |
XPATH_EXPR_NO_INDEX
XPath expression, no index |
static char |
XPATH_EXPR_WILDCARD
XPath expression template wildcard. |
Fields inherited from interface org.primordion.xholon.base.IXholon |
DEFAULT_SIZE_MSG_Q, NINCLUDE_PSC, NINCLUDE_PSx, NINCLUDE_PxC, NINCLUDE_Pxx, NINCLUDE_xSC, NINCLUDE_xSx, NINCLUDE_xxC, NINCLUDE_xxx |
Method Summary | |
boolean |
getIsConjugated()
Get whether or not this is a conjugated port. |
IXholon |
getLink(int index)
Get the link from a local port replication to a remote port or xholon. |
IPortInterface |
getProvidedInterface()
Get the provided interface of this port. |
IPortInterface |
getRequiredInterface()
Get the required interface of this port. |
void |
sendMessage(int signal,
java.lang.Object data,
IXholon sender,
int index)
Send a ROOM/UML2 message through a local instance of a replicated port to a remote replicated port instance or directly to a remote xholon, or from a remote port replication to its owning xholon. |
void |
setIsConjugated(boolean isConjugated)
Set whether or not this is a conjugated port. |
boolean |
setLink(int index,
IXholon context,
java.lang.String xpathExpression)
Set the link from a local port replication to a remote port or xholon. |
boolean |
setLink(int index,
IXholon context,
java.lang.String xpathExprTemplate,
int xholonIx,
int portIx,
int replicationIx)
Set the link from a local port replication to a remote port or xholon. |
void |
setProvidedInterface(IPortInterface providedInterface)
Set the provided interface of this port. |
void |
setReplications(int multiplicity)
Set the replication factor of a remote port, and create the remote port. |
void |
setRequiredInterface(IPortInterface requiredInterface)
Set the required interface of this port. |
Field Detail |
public static final char XPATH_EXPR_WILDCARD
public static final int XPATH_EXPR_NO_INDEX
Method Detail |
public void setProvidedInterface(IPortInterface providedInterface)
providedInterface
- An array of zero or more signal IDs.public IPortInterface getProvidedInterface()
public void setRequiredInterface(IPortInterface requiredInterface)
requiredInterface
- An array of zero or more signal IDs.public IPortInterface getRequiredInterface()
public void setIsConjugated(boolean isConjugated)
isConjugated
- true (conjugated) or false (non-conjugated). default: falsepublic boolean getIsConjugated()
public void setReplications(int multiplicity)
multiplicity
- The maximum number of instances of the remote port.public boolean setLink(int index, IXholon context, java.lang.String xpathExprTemplate, int xholonIx, int portIx, int replicationIx)
index
- Index of the local replicated port on which the link is to be set.context
- The xholon that owns the port and port replication.xpathExprTemplate
- XPath expression template.xholonIx
- Remote xholon index, used to fill in a value in the template.
If there is no index, then the value must be XPATH_EXPR_NO_INDEX.portIx
- Remote port index, used to fill in a value in the template.
If there is no index, then the value must be XPATH_EXPR_NO_INDEX.replicationIx
- Remote replication index, used to fill in a value in the template.
If there is no index, then the value must be XPATH_EXPR_NO_INDEX.public boolean setLink(int index, IXholon context, java.lang.String xpathExpression)
index
- Index of the local replicated port on which the link is to be set.context
- The xholon that owns the port and port replication.xpathExpression
- Complete XPath expression.
public IXholon getLink(int index)
index
- Index of the local replicated port.
public void sendMessage(int signal, java.lang.Object data, IXholon sender, int index)
sendMessage
in interface IXholon
signal
- A distinguishing identifier for this message.data
- Any data that needs to be sent (optional).sender
- The sender of the message.index
- Index of a replicated port (0 indexed).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |