edu.umn.cs.crisys
Class RSM.ReceiveInterface
java.lang.Object
|
+--edu.umn.cs.crisys.RSM.Interface
|
+--edu.umn.cs.crisys.RSM.ReceiveInterface
- All Implemented Interfaces:
- java.util.Observer
- Enclosing class:
- RSM
- public static final class RSM.ReceiveInterface
- extends edu.umn.cs.crisys.RSM.Interface
- implements java.util.Observer
RSML-e Receive Interfaces. Automatically calls the state-machine's
next method (synchronously) whenever an input message is received.
Field Summary |
protected boolean |
isOpen
flag to indicate state of this RMSL-e interface. |
protected edu.umn.cs.crisys.nimbus.NimbusJavaWrapper |
myChannel
|
edu.umn.cs.crisys.RSM.Message |
myMessage
Reference to my message object which stores the latest message
on this interface. |
java.lang.String |
myName
Descriptive name for this interface. |
Constructor Summary |
RSM.ReceiveInterface(java.lang.String name,
java.lang.String channelName,
edu.umn.cs.crisys.RSM.Message msg)
Constructor. |
Method Summary |
void |
close()
Closes the interface. |
void |
open()
Initializes interface for communication by calling super.open(). |
void |
update(java.util.Observable o,
java.lang.Object arg)
The method that gets invoked from the COM channel framework
when a message is received. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myName
public final java.lang.String myName
- Descriptive name for this interface.
myChannel
protected edu.umn.cs.crisys.nimbus.NimbusJavaWrapper myChannel
myMessage
public final edu.umn.cs.crisys.RSM.Message myMessage
- Reference to my message object which stores the latest message
on this interface.
isOpen
protected boolean isOpen
- flag to indicate state of this RMSL-e interface.
RSM.ReceiveInterface
public RSM.ReceiveInterface(java.lang.String name,
java.lang.String channelName,
edu.umn.cs.crisys.RSM.Message msg)
- Constructor. Calls the interface constructor with the passed parameters
adding the appropriate channel type.
open
public void open()
- Initializes interface for communication by calling super.open().
Registers itself as an observer with its channel so that it is
notified when messages are received.
- Overrides:
open
in class edu.umn.cs.crisys.RSM.Interface
update
public void update(java.util.Observable o,
java.lang.Object arg)
- The method that gets invoked from the COM channel framework
when a message is received. This in turn calls the state machine,
if it is running, to execute its next step computation.
- Specified by:
update
in interface java.util.Observer
close
public void close()
- Closes the interface. Unregisters it with the COM channel
framework. Must be called when sate-machine is shutdown.