|
DRCL JavaSim API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.comp.Component
Component is the base class for implementing components in the
Autonomous Component Architecture (ACA).
A component in ACA is analogous to an IC chip in digital circuit design.
As pins to an IC chip, ports are the only means with which a
component is interfaced with the rest of the system. And as the
specification in a data cookbook in digital circuit desgin, a component is
fully specified by contracts. A contract describes how a
a component expects and responds what format of data to arrive and send
at which ports.
When data arrives at a component, a new thread is spawned and carries
out the process() method to process the
data at the component. The data processing must follow the contract(s)
that are obtained by getContract(Port).
There are a rich set of data structures and methods defined in a component.
Some of which are facilities that facilitate using a component in a system.
Some of which are methods defined in ACA which a subclass must implement.
Some of which are API's that writing a component subclass may take advantage of.
All these are categorized and described as follows:
addComponent() and
removeComponent()
methods to manipulate the component hierarchy.
addPort()
and removePort() methods, or use specialized
methods (addEventPort(String), addForkPort(String),
addServerPort(String)) to create ports in defined port groups.
reboot() to reset the component hierarchy
and the associated runtime.
ActiveComponent operations: One may use (1) run() to
start all the ActiveComponents under this component hierarchy;
(2) stop() to stop all the ActiveComponents under this component
hierarchy; and (3) resume() to resume all the ActiveComponents
under this component hierarchy. The operate()
method provides a unified and general form of the above three operations.
_start(),
_stop() and _resume() to make these operations work.
reset()
to reset this component to the initial state; (2) duplicate(Object)
to duplicate the contents of another component; and (3) info()
to provide the current states of this component for varifying the
operations of this component at run-time.
infoport): every component is
equipped with an infoport. A component may export
different types of messages at this port:
Error message: An error
message is exported when some error occurs in processing some
data. Subclasses should use one of the error()
methods to send out an error message.
Garbage message: A garbage
message is exported when data is unwanted and discarded by the
component due to the component's capacity or defined policy.
Subclasses should use one of the drop()
methods to send out a garbage message.
Trace message: A trace
message is exported when data arrives or is sent out at a port.
Exports of trace messages are implemented in the base class.
Subclasses do not need to send out such messages.
Debug message: Subclasses may
export debug messages whenever appropriate to facilitate diagnosing
an erroneous component.
Subclasses should use debug(Object) to send out a debug
message.
infoport and event ports.
(ii) ActiveComponent states, and (iii) debug level bits, each
of which can be used to enable/disable export of debug messages at a
debug level.
|
|
| 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| FLAG | FLAG NAME | DESCRIPTION |
| E | Enabled | If disabled, the component does not respond to any arriving data. Default is enabled. |
| EE | ErrorEnabled | If disabled, the component suppresses error messages
being sent out. Default is enabled.
|
| GE | GarbageEnabled | If disabled, the component suppresses garbage messages
being sent out. Default is disabled.
|
| GDE | GarbageDisplayEnabled | The displayable flag of the garbage messages
being sent out is set to the value of this flag. Default is disabled.
|
| DE | DebugEnabled | If disabled, the component suppresses debug messages
being sent out. Default is disabled.
|
| TE | TraceEnabled | If disabled, the component suppresses trace messages
being sent out. Default is disabled.
|
| VE | EventEnabled | If disabled, the component suppresses event messages
being sent out. Default is enabled.
|
| CN | ComponentNotification | If enabled, componentAdded(Component)/componentRemoved(Component)
is invoked whenever a component is added in/removed from this component. Default is disabled.
|
| PN | PortNotification | If enabled, portAdded(Port)/portRemoved(Port) is invoked whenever a port
is added to/removed from this component. Default is disabled.
|
| DOE | DirectOutputEnabled | If enabled, all the above messages are sent to standard output directly instead of
being sent out at infoport. Default is disabled.
|
| ST | Started | This flag is set if this component is started as ActiveComponent
(see run()).
It is reset when the component is reset (reset()).
This flag is effective only if this component is an ActiveComponent.
|
| SP | Stopped | This flag is set if the component is stopped (by stop()) and has not been
resumed (resume()). The flag is reset if the component is reset
(reset()) or resumed (resume()).
This flag is effective only if this component is an ActiveComponent.
|
isDebugEnabled() to check if the
debug flag is set, and setDebugEnabled(boolean) to enable/disable the debug
flag of this component.
setDebugEnabledAt()/isDebugEnabledAt() to control/check export of debug messages of a debug level.
Debug levels are only valid when the debug flag is enabled.
To make the above methods usable, a subclass must implement getDebugLevelNames().
setComponentNotificationEnabled(boolean) or setPortNotificationEnabled(boolean)
and then implement componentAdded(Component)/componentRemoved(Component)
or portAdded(Port)/portRemoved(Port).
getTime(), time control
(sleepFor(double), sleepUntil(double)), mutex
(lock(Object), unlock(Object)), synchronization
(wait(Object), notify(Object), notifyAll(Object)),
fork events (fork(Port, Object, double), forkAt(Port, Object, double),
send(Port, Object, double), sendAt(Port, Object, double),
and cancelFork(ACATimer)),
binding contracts (setContract(Class, String, Contract)).
Port,
Contract,
ContractMultiple, Serialized Form| Inner Class Summary | |
static class |
Component.LockPack
|
| Field Summary | |
static int |
FLAG_COMPONENT_NOTIFICATION
|
static int |
FLAG_DEBUG_ENABLED
|
static int |
FLAG_DIRECT_OUTPUT_ENABLED
|
static int |
FLAG_ENABLED
Bit mask of the enabled flag. |
static int |
FLAG_ERROR_ENABLED
Bit mask of the enabled flag. |
static int |
FLAG_EVENT_ENABLED
|
static int |
FLAG_GARBAGE_DISPLAY_ENABLED
|
static int |
FLAG_GARBAGE_ENABLED
|
static int |
FLAG_PORT_NOTIFICATION
|
static int |
FLAG_STARTED
|
static int |
FLAG_STOPPED
|
static int |
FLAG_TRACE_ENABLED
|
static int |
FLAG_UNDEFINED_START
|
java.lang.String |
id
Identification, must be unique within the parent component. |
Port |
infoPort
The information port of this component. |
Component.LockPack |
lockHead
|
java.lang.String |
name
Descriptive name for the component. |
Component |
parent
Parent component. |
static java.lang.String |
PortGroup_DEFAULT_GROUP
The default port group. |
static java.lang.String |
PortGroup_EVENT
The event port group. |
static java.lang.String |
PortGroup_SERVICE
The service port group. |
static Component |
Root
The root of the component system. |
static java.lang.String |
Trace_DATA
Data arrival trace type. |
static java.lang.String |
Trace_SEND
Data sending trace type. |
| Constructor Summary | |
Component()
|
|
Component(java.lang.String id_)
|
|
| Method Summary | |
protected void |
_resume()
This method is invoked in a new thread context when resume() is called. |
protected void |
_start()
This method is invoked in a new thread context when run() is called. |
protected void |
_stop()
This method is invoked in a new thread context when stop() is called. |
void |
addComponent(Component c_)
Adds a child component. |
void |
addComponent(Component c_,
boolean inheritRuntime_)
Adds a child component. |
Port |
addEventPort(java.lang.String pid_)
Adds an event port to the default port group of this component. |
Port |
addEventPort(java.lang.String pgid_,
java.lang.String pid_)
Adds an event port to the specified port group of this component. |
Port |
addForkPort(java.lang.String pid_)
Adds a fork port to the default port group of this component. |
Port |
addPort(Port new_,
java.lang.String newID_)
Adds a port to the default port group with the given port id, It assigns an ID if the given id is null. |
Port |
addPort(Port new_,
java.lang.String newID_,
boolean isRemovable_)
Adds a port to the default port group with the given port id, It assigns an ID if the given id is null. |
Port |
addPort(Port new_,
java.lang.String groupID_,
java.lang.String newID_)
Adds a port with the given group id and the port id. |
Port |
addPort(Port new_,
java.lang.String groupID_,
java.lang.String newID_,
boolean isRemovable_)
Adds a port with the given group id and the port id. |
Port |
addPort(java.lang.String id_)
Creates a port in the default port group with the given port id, It assigns an ID if the given id is null. |
Port |
addPort(java.lang.String id_,
boolean isRemovable_)
Creates a port in the default port group with the given port id, It assigns an ID if the given id is null. |
Port |
addPort(java.lang.String groupID_,
java.lang.String id_)
Creates a port with the given group id and the port id. |
Port |
addPort(java.lang.String groupID_,
java.lang.String id_,
boolean isRemovable_)
Creates a port with the given group id and the port id. |
Port |
addServerPort(java.lang.String pid_)
Adds a server port to the default port group of this component. |
Port |
addServerPort(java.lang.String pgid_,
java.lang.String pid_)
Adds a server port to the specified port group of this component. |
void |
cancelFork(ACATimer handle_)
Cancels a fork event. |
protected void |
componentAdded(Component c_)
The hookup method for subclasses to handle the event when a child component is added. |
protected void |
componentRemoved(Component c_)
The hookup method for subclasses to handle the event when a child component is removed. |
boolean |
connect(Component c_,
boolean shared_)
stablishes a two-way connection between this and the specified component. |
boolean |
containsComponent(Component c_)
Returns true if the specified component is an immediate child of this component. |
boolean |
containsComponent(java.lang.String id_)
Returns true if the ID matches one of its child components'. |
boolean |
containsPort(Port p_)
Returns true if the component owns the port. |
void |
debug(java.lang.Object info_)
Send debug information at infoport. |
void |
disconnectAll()
Disconnects all the ports of this component. |
void |
disconnectAllPeers()
Disconnects this component from the rest of the system. |
void |
disconnectAllPorts(java.lang.String groupID_)
Disconnects all the ports in the port group. |
void |
drop(java.lang.Object o_)
Drops the garbage at infoport. |
void |
drop(java.lang.Object o_,
java.lang.String description_)
Drops the garbage with description at infoport. |
void |
duplicate(java.lang.Object source_)
Duplicates the content of source_, including ID, name, child components and connections among them, to this component. |
void |
error(java.lang.Object data_,
java.lang.String method_,
Port p_,
java.lang.Object error_)
Sends an error message at infoport. |
void |
error(java.lang.String method_,
java.lang.Object error_)
Sends an error message at infoport. |
void |
expose(Component child_)
Makes the child component receives all the data as this parent component does. |
void |
exposeEventPorts(Component c_)
Exposes the event ports of the given child component. |
Port |
exposePort(Component child_,
java.lang.String pid_)
Creates a port that proxies for the client port, specified by the child component, group id and port id. |
Port |
exposePort(Component child_,
java.lang.String groupID_,
java.lang.String id_)
Creates a shadow port for a port of the child component's, specified by the child component, the port group id and the port id. |
Port |
exposePort(Component child_,
java.lang.String groupID_,
java.lang.String id_,
java.lang.String mygroupID_,
java.lang.String myID_)
Creates a shadow port, with the given group id and the port id, for a port of the child component, specified by the child component, the port group id and the port id. |
Port |
exposePort(Port client_)
Creates a shadow port for the client port and makes it have the same group ID and port ID as the client's. |
Port |
exposePort(Port client_,
java.lang.String mygroupID_,
java.lang.String myID_)
Creates a shadow port, with the given group id and the port id, for the client port. |
Port |
findAvailable()
Returns an unconnected port from the default connection port group of this component. |
Port |
findAvailable(java.lang.String groupID_)
Returns an unconnected port from the specified port group. |
Port |
findAvailable(java.lang.String groupID_,
java.lang.String portType_)
Returns an unconnected port of the given port type from the specified port group. |
protected void |
finishing()
Notifies of the end of data processing (for performance-aware components). |
ACATimer |
fork(Port which_,
java.lang.Object data_,
double duration_)
Sets up a fork event. |
ACATimer |
forkAt(Port which_,
java.lang.Object data_,
double time_)
Sets up a fork event. |
Component[] |
getAllComponents()
Returns all the child components. |
Port[] |
getAllPorts()
Returns all the ports of this component. |
Port[] |
getAllPorts(java.lang.String groupID_)
Returns all the ports of the port group in this component. |
Wire[] |
getAllWiresInside()
Returns all the wires that the ports of the child components are attached to. |
Wire[] |
getAllWiresInsideOut()
Returns all the wires that the ports of this component and the child components are attached to. |
Wire[] |
getAllWiresOut()
Returns all the wires that the ports of this component are attached to. |
Component |
getComponent(java.lang.String id_)
Returns the child given the component ID. |
long |
getComponentFlag()
Returns the info flag of this component. |
long |
getComponentFlag(long mask_)
Returns portion of the info flag masked by mask_ |
static Contract |
getContract(Port p_)
Returns the contract associated with the port. |
static java.util.Hashtable |
getContractHT()
For debugging purposes. |
static java.util.Hashtable |
getContractHT(java.lang.String name_)
For debugging purposes. |
java.lang.String |
getDebugFlagsInBinary()
Prints the debug level flags as bitset; 1 as enabled and 0 disabled. |
java.lang.String[] |
getDebugLevelNames()
Returns the names of defined debug levels; subclasses should override this method if debug levels are defined. |
protected ForkManager |
getForkManager()
Returns the fork runtime associated with this component. |
java.lang.String |
getID()
Returns the identification of the component. |
java.lang.String |
getName()
Returns the (informational) name of the component. |
Component |
getParent()
Returns the parent component. |
Port |
getPort(java.lang.String id_)
Returns the port in the default group given the port ID. |
Port |
getPort(java.lang.String groupID_,
java.lang.String id_)
Returns the port given the group ID and the port ID. |
Component |
getRoot()
Returns the root component of the component system. |
protected ACARuntime |
getRuntime()
Returns the runtime associated with this component. |
double |
getTime()
Returns the system time. |
void |
iduplicate(Component that_)
Duplicates the internal structure of the source component. |
java.lang.String |
info()
Returns information regarding this component. |
boolean |
isAncestorOf(Component c_)
Returns true if the component hierarchy rooted at this component contains the specified component. |
protected boolean |
isComponentNotificationEnabled()
Returns true if the component-added notification flag is enabled. |
boolean |
isContainer()
Returns true if this component is a container. |
boolean |
isDebugEnabled()
Returns true if the debug flag is on. |
boolean |
isDebugEnabledAt(int level_)
Returns true if the flag(s) is(are) enabled at the specified debug level(s). |
boolean |
isDirectOutputEnabled()
Returns true if the error notice flag is on. |
boolean |
isEnabled()
Returns true if the component is enabled for receiving data. |
boolean |
isErrorNoticeEnabled()
Returns true if the error notice flag is on. |
boolean |
isEventExportEnabled()
Returns true if the state report flag is on. |
boolean |
isGarbageDisplayEnabled()
Returns true if the garbage display flag is on. |
boolean |
isGarbageEnabled()
Returns true if the garbage flag is on. |
protected boolean |
isPortNotificationEnabled()
Returns true if the port-added notification flag is enabled. |
boolean |
isPortRemovable(Port p_)
Returns true if the port is removable from this component. |
boolean |
isStarted()
Returns true if this component is an ActiveComponent and
has started to run (using the run() method). |
boolean |
isStopped()
|
boolean |
isTraceEnabled()
Returns true if the trace flag is on. |
void |
lock(java.lang.Object o_)
Grabs the lock of the object. |
void |
notify(java.lang.Object o_)
Notifies on the object. |
void |
notifyAll(java.lang.Object o_)
Notifies all the execution contexts that wait on the object. |
void |
operate(double time_,
java.lang.String op_)
Operates all the active components under this component hierarchy. |
protected void |
portAdded(Port p_)
The hookup method for subclasses to handle the event when the port p_ is added to
the component. |
protected void |
portRemoved(Port p_)
The hookup method for subclasses to handle the event when the port p_ is removed from
the component. |
protected void |
process(java.lang.Object data_,
Port inPort_)
The main callback method of a component. |
void |
reboot()
Resets the component and the associated runtime. |
void |
removeAll()
Removes all the children and ports. |
void |
removeAllComponents()
Removes all the child components. |
void |
removeAllPorts()
Removes all the ports. |
void |
removeAllPorts(java.lang.String groupID_)
Removes all the ports of the port group. |
Component |
removeComponent(Component c_)
Removes a child from this component. |
Component |
removeComponent(java.lang.String id_)
Removes a child given the component ID. |
Port |
removePort(Port p_)
Removes the port. |
Port |
removePort(java.lang.String id_)
Removes the port in the default port group. |
Port |
removePort(java.lang.String groupID_,
java.lang.String id_)
Removes the port given the group id and the port id. |
void |
reset()
Resets the component for being used anew. |
void |
resume()
Resumes all the active components under this component hierarchy. |
void |
run()
Starts all the active components under this component hierarchy. |
void |
sduplicate(Component that_)
Duplicates the child components and the structure (including the shadow connections) from the source component. |
ACATimer |
send(Port which_,
java.lang.Object data_,
double duration_)
Sets up a delayed send event. |
ACATimer |
sendAt(Port which_,
java.lang.Object data_,
double time_)
Sets up a delayed send event. |
void |
setComponentFlag(long flag_)
Sets the info flag of this component. |
void |
setComponentFlag(long mask_,
boolean v_)
Sets the info flag at the 1's in mask_. |
protected void |
setComponentNotificationEnabled(boolean v_)
Turns on/off the component-added notification flag. |
protected static void |
setContract(java.lang.Class class_,
java.lang.String id_,
Contract c_)
Associates a port or a set of ports with the contract. |
void |
setDebugEnabled(boolean v_)
Turns on/off the debug flag. |
void |
setDebugEnabled(boolean v_,
boolean recursive_)
Turns on/off the debug flag recursively. |
void |
setDebugEnabledAt(boolean v_,
int level_)
Enables/disables one or more debug levels. |
void |
setDebugEnabledAt(boolean v_,
int[] levels_)
Enables/disables one or more debug levels. |
void |
setDebugEnabledAt(boolean v_,
java.lang.String[] levels_)
Enables/disables one or more debug levels given the debug level name(s). |
void |
setDirectOutputEnabled(boolean v_)
Turns on/off the direct-output flag. |
void |
setDirectOutputEnabled(boolean v_,
boolean recursive_)
Turns on/off the direct-output flag recursively. |
void |
setEnabled(boolean v_)
Enables/disables the component (and child components) for receiving data. |
void |
setErrorNoticeEnabled(boolean v_)
Turns on/off the error notice flag. |
void |
setErrorNoticeEnabled(boolean v_,
boolean recursive_)
Turns on/off the error notice flag recursively. |
void |
setEventExportEnabled(boolean v_)
Turns on/off the state report flag. |
void |
setEventExportEnabled(boolean v_,
boolean recursive_)
Turns on/off the state report flag recursively. |
void |
setExecutionBoundary(boolean v_)
|
void |
setGarbageDisplayEnabled(boolean v_)
Turns on/off the garbage display flag. |
void |
setGarbageDisplayEnabled(boolean v_,
boolean recursive_)
Turns on/off the garbage display flag recursively. |
void |
setGarbageEnabled(boolean v_)
Turns on/off the garbage flag. |
void |
setGarbageEnabled(boolean v_,
boolean recursive_)
Turns on/off the garbage flag recursively. |
java.lang.String |
setID()
This method automatically finds a valid ID in the parent component for this component. |
void |
setID(java.lang.String newID_)
Sets the identification of the component. |
void |
setName(java.lang.String name_)
Sets the (informational) name of this component. |
void |
setPort(Port newPort_,
java.lang.String id_)
Replaces the port in the default port group, given the port id, with newPort. |
void |
setPort(Port newPort_,
java.lang.String groupID_,
java.lang.String id_)
Replaces the port, the given group id and the port id, with newPort. |
protected void |
setPortNotificationEnabled(boolean v_)
Turns on/off the port-added notification flag. |
protected void |
setPortRemovable(Port p_,
boolean v_)
Sets the port to be (un)removable. |
protected void |
setRuntime(ACARuntime m_)
Sets the runtime associated with this component. |
void |
setTraceEnabled(boolean v_)
Turns on/off the component trace flag and all ports' (except infoPort) trace flags. |
void |
setTraceEnabled(boolean v_,
boolean recursive_)
Turns on/off the trace flags recursively. |
void |
sleepFor(double time_)
Sleeps for time seconds. |
void |
sleepUntil(double time_)
Sleeps util the time specified. |
void |
stop()
Stops all the active components under this component hierarchy. |
java.lang.String |
toString()
Returns the full path of the component. |
void |
unexpose(Component child_)
Undoes what expose(Component) did. |
void |
unlock(java.lang.Object o_)
Releases the lock of the object. |
void |
useLocalForkManager()
Creates and associates a local fork runtime with this component. |
void |
useLocalForkManager(boolean simple_)
Creates and associates a local fork runtime with this component. |
void |
wait(java.lang.Object o_)
Waits on the object until being notified. |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String PortGroup_DEFAULT_GROUP
public static final java.lang.String PortGroup_EVENT
public static final java.lang.String PortGroup_SERVICE
public java.lang.String id
public java.lang.String name
public Component parent
public final Port infoPort
error,
garbage,
trace, and
debug.public static final int FLAG_ENABLED
public static final int FLAG_ERROR_ENABLED
public static final int FLAG_GARBAGE_ENABLED
public static final int FLAG_GARBAGE_DISPLAY_ENABLED
public static final int FLAG_DEBUG_ENABLED
public static final int FLAG_TRACE_ENABLED
public static final int FLAG_EVENT_ENABLED
public static final int FLAG_COMPONENT_NOTIFICATION
public static final int FLAG_PORT_NOTIFICATION
public static final int FLAG_DIRECT_OUTPUT_ENABLED
public static final int FLAG_STARTED
public static final int FLAG_STOPPED
public static final int FLAG_UNDEFINED_START
public static final java.lang.String Trace_DATA
public static final java.lang.String Trace_SEND
public Component.LockPack lockHead
public static Component Root
| Constructor Detail |
public Component()
public Component(java.lang.String id_)
id_ - the component ID.| Method Detail |
public void reset()
public void reboot()
protected void _start()
run() is called.
An ActiveComponent subclass must override this method to start this component.protected void _stop()
stop() is called.
An ActiveComponent subclass must override this method to stop this component.protected void _resume()
resume() is called.
An ActiveComponent subclass must override this method to resume this component.public final void run()
public final void stop()
public final void resume()
public final void operate(double time_,
java.lang.String op_)
run(), stop() and resume().time_ - operating the component at the specified time later.op_ - the operator.public Component getParent()
public void setID(java.lang.String newID_)
public java.lang.String setID()
class_name, class_name(2),
class_name(3) and so on.public java.lang.String getID()
public void setName(java.lang.String name_)
public java.lang.String getName()
public java.lang.String toString()
toString in class DrclObjpublic final boolean isStarted()
ActiveComponent and
has started to run (using the run() method). A started component
cannot be started again until being reset (reset()).public final boolean isStopped()
protected void process(java.lang.Object data_,
Port inPort_)
data_ - the arrival data.inPort_ - the port where the data arrives.public final Port addEventPort(java.lang.String pid_)
public final Port addEventPort(java.lang.String pgid_,
java.lang.String pid_)
public final Port addServerPort(java.lang.String pid_)
public final Port addServerPort(java.lang.String pgid_,
java.lang.String pid_)
public final Port addForkPort(java.lang.String pid_)
public final Port getPort(java.lang.String groupID_,
java.lang.String id_)
public final Port getPort(java.lang.String id_)
public final Port[] getAllPorts()
public final Port[] getAllPorts(java.lang.String groupID_)
public final void removeAllPorts()
public final void removeAllPorts(java.lang.String groupID_)
public final Port removePort(java.lang.String groupID_,
java.lang.String id_)
removePort() methods end up with calling
this method.groupID_ - group ID of the port.id_ - ID of the port.public final Port removePort(Port p_)
p_ - the port to be removed from this component.public final Port removePort(java.lang.String id_)
id_ - ID of the port.
public final void setPort(Port newPort_,
java.lang.String groupID_,
java.lang.String id_)
newPort.
It does not disconnect the replaced port.
public final void setPort(Port newPort_,
java.lang.String id_)
newPort.
It does not disconnect the replaced port.
public final Port addPort(Port new_,
java.lang.String groupID_,
java.lang.String newID_)
new_ - the port to be added to this component.groupID_ - group ID of the port.newID_ - ID of the port.
public final Port addPort(Port new_,
java.lang.String groupID_,
java.lang.String newID_,
boolean isRemovable_)
new_ - the port to be added to this component.groupID_ - group ID of the port.newID_ - ID of the port.
public final Port addPort(Port new_,
java.lang.String newID_)
id_ - ID of the port.
public final Port addPort(Port new_,
java.lang.String newID_,
boolean isRemovable_)
id_ - ID of the port.public final Port addPort(java.lang.String id_)
id_ - ID of the port.
public final Port addPort(java.lang.String id_,
boolean isRemovable_)
id_ - ID of the port.
public final Port addPort(java.lang.String groupID_,
java.lang.String id_)
groupID_ - group ID of the port.id_ - ID of the port.
public final Port addPort(java.lang.String groupID_,
java.lang.String id_,
boolean isRemovable_)
groupID_ - group ID of the port.id_ - ID of the port.public final boolean containsPort(Port p_)
public final boolean isPortRemovable(Port p_)
protected final void setPortRemovable(Port p_,
boolean v_)
public boolean connect(Component c_,
boolean shared_)
findAvailable() to get ports from
he components for connection. By default, the method returns an
vailable port in the default port group. Subclasses should override
findAvailable() if should behave otherwise.shared_ - set to true if both directions of the connection should share the same wire.
see Component.findAvailable()
see Component.findAvailable(String)public Port findAvailable()
connect(Component, boolean),
findAvailable(String)public final Port findAvailable(java.lang.String groupID_)
public final Port findAvailable(java.lang.String groupID_,
java.lang.String portType_)
public Port exposePort(Component child_,
java.lang.String pid_)
public Port exposePort(Component child_,
java.lang.String groupID_,
java.lang.String id_)
public Port exposePort(Component child_,
java.lang.String groupID_,
java.lang.String id_,
java.lang.String mygroupID_,
java.lang.String myID_)
public Port exposePort(Port client_)
public Port exposePort(Port client_,
java.lang.String mygroupID_,
java.lang.String myID_)
public void disconnectAllPeers()
public void addComponent(Component c_)
public void addComponent(Component c_,
boolean inheritRuntime_)
public boolean containsComponent(Component c_)
public boolean isAncestorOf(Component c_)
public boolean containsComponent(java.lang.String id_)
public Component removeComponent(Component c_)
public Component removeComponent(java.lang.String id_)
public Component[] getAllComponents()
public boolean isContainer()
public void removeAllComponents()
public Component getComponent(java.lang.String id_)