org.mbari.siam.distributed.portal
Class QueuedCommand

java.lang.Object
  extended by org.mbari.siam.distributed.portal.QueuedCommand

public abstract class QueuedCommand
extends java.lang.Object

QueuedCommands are stored in a Portal, and forwarded to their destination node when the communications link is available.

Author:
Tom O'Reilly

Field Summary
protected  long _actualSentTime
           
protected  long _deviceID
           
protected  long _earliestSendTime
           
protected  long _latestSendTime
           
protected  java.lang.String _notifyAddress
           
static int ERROR
          Indicates command error.
static int OK
          Indicates command success.
 
Method Summary
 long actualSentTime()
          Time command was actually sent.
 void clearResult()
          Clear result code and string.
 long deviceID()
          Device to which command is addressed.
abstract  void dispatch(Node node)
          Dispatch command to the node.
 long earliestSendTime()
          Earliest time to send command.
 long latestSendTime()
          Latest time to send command.
abstract  java.lang.String name()
          String indicating type of QueuedCommand
 java.lang.String notifyAddress()
          Email to notify when command has been sent.
 int result()
          Result of command; OKAY or ERROR.
 boolean resultSet()
          Indicate whether result has been set.
 java.lang.String resultString()
          String indicating result of command.
 void setActualSentTime(long sentTime)
          Set sent time.
 void setResult(int result, java.lang.String resultString)
          Set result code and string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final int OK
Indicates command success.

See Also:
Constant Field Values

ERROR

public static final int ERROR
Indicates command error.

See Also:
Constant Field Values

_earliestSendTime

protected long _earliestSendTime

_latestSendTime

protected long _latestSendTime

_actualSentTime

protected long _actualSentTime

_notifyAddress

protected java.lang.String _notifyAddress

_deviceID

protected long _deviceID
Method Detail

deviceID

public long deviceID()
Device to which command is addressed.


earliestSendTime

public long earliestSendTime()
Earliest time to send command.


latestSendTime

public long latestSendTime()
Latest time to send command.


actualSentTime

public long actualSentTime()
Time command was actually sent.


setActualSentTime

public void setActualSentTime(long sentTime)
Set sent time.


result

public int result()
Result of command; OKAY or ERROR.


resultString

public java.lang.String resultString()
String indicating result of command.


notifyAddress

public java.lang.String notifyAddress()
Email to notify when command has been sent.


name

public abstract java.lang.String name()
String indicating type of QueuedCommand


clearResult

public void clearResult()
Clear result code and string.


setResult

public void setResult(int result,
                      java.lang.String resultString)
Set result code and string.


resultSet

public boolean resultSet()
Indicate whether result has been set.


dispatch

public abstract void dispatch(Node node)
                       throws java.rmi.RemoteException
Dispatch command to the node. Implementations must catch and process any exceptions specific to the subclass, and should call the setResult() method.

Throws:
java.rmi.RemoteException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.