|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Port
The implementation of a port in the autonomous component architecture (ACA).
A port has separate input and output channels. Each channel can be
connected to a different Wire. The wire that is connected to the
input channel is called the "in-wire" of the port. The wire that is
connected to the output channel is called the "out-wire" of the port.
Use getInWire() and getOutWire() to access those wires.
Component,
Wire,
Serialized Form| Field Summary | |
static boolean |
EXECUTION_BOUNDARY
Set to true to make ports created from now execution boundary. |
java.lang.String |
groupID
ID of the port group this port belongs to. |
Component |
host
|
java.lang.String |
id
ID of the port, unique in the port group it belongs to. |
static int |
PortType_EVENT
The event port type |
static int |
PortType_FORK
The fork port type |
static int |
PortType_IN
The input-only port type. |
static int |
PortType_INOUT
The duplex port type. |
static int |
PortType_OUT
The output-only port type. |
static int |
PortType_SERVER
The server port type |
static java.lang.Object |
SEND_RCV_REQUEST
|
| Constructor Summary | |
Port()
Constructor, default duplex port type. |
|
Port(int type_)
Constructor, with specified port type. |
|
Port(int type_,
boolean exeBoundary_)
Constructor, with specified port type and properties. |
|
| Method Summary | |
boolean |
_isEventExportEnabled()
|
boolean |
anyClient()
Clients = InClients + OutClients. |
boolean |
anyConnection()
Returns true if the port connects to or shadows for at least one port. |
boolean |
anyOutConnection()
Returns true if the port connects to or shadows for at least one port. |
boolean |
anyPeer()
Any peer conntected to this port? |
void |
attachIn(Port p_)
Attaches the port to the IN wire for receiving data from the wire. |
void |
attachIn(Port[] pp_)
Attaches the ports to the IN wire for receiving data from the wire. |
void |
attachOut(Port p_)
Attaches the port to the OUT wire for receiving data from the wire. |
void |
attachOut(Port[] pp_)
Attaches the ports to the OUT wire for receiving data from the wire. |
boolean |
connect(Port peer_)
Bi-direction connection, consider proxying. |
void |
connect(Port[] pp_)
Disconnects from the given ports. |
boolean |
connectTo(Port peer_)
Uni-direction connection, consider proxying. |
void |
connectTo(Port[] pp_)
Connects to the given ports. |
void |
detachIn(Port p_)
Removes the port from the IN wire. |
void |
detachIn(Port[] pp_)
Removes the ports from the IN wire. |
void |
detachOut(Port p_)
Removes the port from the OUT wire. |
void |
detachOut(Port[] pp_)
Removes the port from the OUT wire. |
void |
disconnect()
Disconnect with all peers. |
void |
disconnectClients()
|
void |
disconnectInWire()
Disconnect with all peers and clients on the IN wire. |
void |
disconnectOutWire()
Disconnect with all peers and clients on the OUT wire. |
void |
disconnectPeers()
Removes peers from the wires attached with this port. |
void |
disconnectWithParent()
|
void |
doLastSending(java.lang.Object data_)
Same as doSending(Object) in terms of functionality.
|
void |
doSending(java.lang.Object data_)
Called by the host component to send data at this port. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of the port from source_.
|
void |
exportEvent(java.lang.String evtName_,
double value_,
java.lang.String evtDescription_)
|
void |
exportEvent(java.lang.String evtName_,
java.lang.Object evtObj_,
java.lang.String evtDescription_)
|
Port[] |
getAncestors()
Returns all the ancestor ports (def: the host of which contains the host of this port. |
Port[] |
getClients()
Clients = InClients + OutClients. |
Port[] |
getConceptualClients()
ConceptualClients = ConceptualOutClients + ConceptualInClients. |
Port[] |
getConceptualInClients()
ConceptualInClients: the InClients that belong to direct child components. |
Port[] |
getConceptualInPeers()
ConceptualInPeers: the InPeers except those are hidden by outer components. |
Port[] |
getConceptualOutClients()
ConceptualOutClients: the OutClients that belong to direct child components. |
Contract |
getContract()
|
int |
getFlag()
|
java.lang.String |
getGroupID()
Get the id of the group this port belongs to. |
Component |
getHost()
Returns the host component. |
java.lang.String |
getID()
Returns the id of the port. |
Port[] |
getInAncestors()
Returns all the ancestor in ports (def: the host of which contains the host of this port. |
Port[] |
getInClients()
InClients: the set of ports at which if data is sent, the data would arrive at this port. |
Port[] |
getInPeers()
InPeers: if data is sent at this port, the set of ports (including shadow ports) at which the data would arrive. |
Port[] |
getInShadows()
|
Wire |
getInWire()
|
Port[] |
getOutAncestors()
Returns all the ancestor out ports (def: the host of which contains the host of this port. |
Port[] |
getOutClients()
OutClients: the set of ports at which if data is sent, the data would arrive at this port. |
Port[] |
getOutPeers()
OutPeers: the set of ports (including shadow ports) at which if data is sent, the data would arrive at this port. |
Port[] |
getOutShadows()
|
Wire |
getOutWire()
|
Port[] |
getParentPeers()
Returns host's ancestor's peers and the shadow ports. |
Port[] |
getPeers()
Peers = InPeers + OutPeers. |
Port[] |
getShadows()
|
int |
getType()
|
java.lang.String |
getTypeInString()
Returns the port type of this port. |
java.lang.String |
info()
|
void |
inoutSplit()
Splits the "IN" wire/"OUT" wire of this port. |
boolean |
isConnectedWith(Port p_)
|
boolean |
isDataTraceEnabled()
|
boolean |
isEventExportEnabled()
|
boolean |
isExecutionBoundary()
|
boolean |
isRemovable()
|
boolean |
isSendTraceEnabled()
|
boolean |
isShadow()
|
void |
reset()
|
java.lang.Object |
sendReceive(java.lang.Object data_)
|
boolean |
set(java.lang.String gid_,
java.lang.String id_)
Sets the group ID and port ID of this port. |
void |
setDataTraceEnabled(boolean enabled_)
|
void |
setEventExportEnabled(boolean enabled_)
|
void |
setExecutionBoundary(boolean flag_)
|
boolean |
setGroupID(java.lang.String groupID_)
Sets the id of the group this port belongs to. |
void |
setHost(Component host_)
Sets the host component. |
boolean |
setID(java.lang.String id_)
Set the id of the port, unique in the port group it belongs to. |
void |
setRemovable(boolean flag_)
|
void |
setSendTraceEnabled(boolean enabled_)
|
void |
setShadow(boolean flag_)
|
void |
setTraceEnabled(boolean enabled_)
|
void |
setType(int type_)
|
void |
setType(java.lang.String type_)
|
java.lang.String |
toString()
Returns the full path. |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static boolean EXECUTION_BOUNDARY
public static final int PortType_INOUT
public static final int PortType_IN
public static final int PortType_OUT
public static final int PortType_SERVER
public static final int PortType_EVENT
public static final int PortType_FORK
public java.lang.String groupID
setGroupID(String) or set(String, String) to
set the group ID of a port
because it affects the bookkeeping in the host component.
public java.lang.String id
setID(String) or set(String, String) to set
the ID of a port
because it affects the bookkeeping in the host component.
groupIDpublic Component host
public static final java.lang.Object SEND_RCV_REQUEST
| Constructor Detail |
public Port()
public Port(int type_)
public Port(int type_,
boolean exeBoundary_)
| Method Detail |
public final void reset()
public final void setHost(Component host_)
public final Component getHost()
public final boolean setGroupID(java.lang.String groupID_)
public final java.lang.String getGroupID()
public final boolean setID(java.lang.String id_)
public final boolean set(java.lang.String gid_,
java.lang.String id_)
public final java.lang.String getID()
public final void setType(int type_)
public final void setType(java.lang.String type_)
public final java.lang.String getTypeInString()
public final int getType()
public final void setExecutionBoundary(boolean flag_)
public final boolean isExecutionBoundary()
public final int getFlag()
public final void setRemovable(boolean flag_)
public final boolean isRemovable()
public final void setTraceEnabled(boolean enabled_)
public final void setDataTraceEnabled(boolean enabled_)
public final boolean isDataTraceEnabled()
public final void setSendTraceEnabled(boolean enabled_)
public final boolean isSendTraceEnabled()
public final void setEventExportEnabled(boolean enabled_)
public final boolean isEventExportEnabled()
public final boolean isShadow()
public void setShadow(boolean flag_)
public final Contract getContract()
public Wire getOutWire()
public Wire getInWire()
public final boolean anyConnection()
public final boolean anyOutConnection()
public final boolean anyClient()
{@link #getInClients()},
{@link #getOutClients()}public final Port[] getClients()
{@link #getInClients()},
{@link #getOutClients()}public final Port[] getOutClients()
public final Port[] getInClients()
public final Port[] getConceptualClients()
{@link #getConceptualInClients()},
{@link #getConceptualOutClients()}public final Port[] getConceptualOutClients()
public final Port[] getConceptualInClients()
public final boolean anyPeer()
{@link #getInPeers()},
{@link #getOutPeers()}public final Port[] getPeers()
{@link #getInPeers()},
{@link #getOutPeers()}public final Port[] getOutPeers()
public final Port[] getInPeers()
public final Port[] getConceptualInPeers()
public final Port[] getAncestors()
public final Port[] getOutAncestors()
public final Port[] getInAncestors()
public final Port[] getShadows()
public final Port[] getOutShadows()
public final Port[] getInShadows()
public final Port[] getParentPeers()
public boolean isConnectedWith(Port p_)
public final void doSending(java.lang.Object data_)
public final void doLastSending(java.lang.Object data_)
doSending(Object) in terms of functionality.
Performance-aware components may use
the runtime
notifies the runtime
public final java.lang.Object sendReceive(java.lang.Object data_)
public final boolean connect(Port peer_)
public final void connect(Port[] pp_)
public final void attachIn(Port p_)
public final void attachIn(Port[] pp_)
public final void detachIn(Port p_)
public final void detachIn(Port[] pp_)
public final void attachOut(Port p_)
public final void attachOut(Port[] pp_)
public final void detachOut(Port p_)
public final void detachOut(Port[] pp_)
public final boolean connectTo(Port peer_)
public final void connectTo(Port[] pp_)
public final void disconnect()
public final void disconnectInWire()
public final void disconnectOutWire()
public final void disconnectPeers()
public final void disconnectClients()
public final void disconnectWithParent()
public void inoutSplit()
public final void exportEvent(java.lang.String evtName_,
java.lang.Object evtObj_,
java.lang.String evtDescription_)
public final void exportEvent(java.lang.String evtName_,
double value_,
java.lang.String evtDescription_)
public final boolean _isEventExportEnabled()
public final void duplicate(java.lang.Object source_)
source_.
This method is meant to be invoked by Component.
It only duplicates the flag. ID, groupID and wires are not copied.
duplicate in interface ObjectDuplicableduplicate in class DrclObjpublic final java.lang.String toString()
toString in class DrclObjpublic final java.lang.String info()
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||