|
DJAVA | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectau.gov.aao.drama.DramaPath.ResponseHandler
au.gov.aao.drama.DramaMonitor
public class DramaMonitor
This class implements parameter monitoring in a
DramaPath.ResponseHandler
- that is, it implements
a handler for DRAMA messages sent using a
DramaPath object. The various
constructors in this class use
DramaPath.Monitor
to send a
DRAMA Monitor messages to the specified task. The arguments to the
constructor determine what is being monitored. Both normal montior
(parameter changes sent to task which initiated the monitor) and
forward monitors (parameter changes sent to a third task) can be sent.
Each constructor takes an argument of class
DramaMonitor.MonResponse. The DramaMonitor.MonResponse
class provides for handling of each of the four possible monitor
releated events, being SuccessCompletion (the monitor transaction has
completed without error), ErrorCompletion (the monitor transaction has
completed with error), Started (the monitor transaction has started) and
Changed (The value of a monitored parameter has changed).
This class overrides the Success(), Trigger() and Error() methods
of
DramaPath.ResponseHandler
and relies on its own versions of those
methods to implement its functionality and thus these are tagged as
final to prevent overriding of them.
DRAMA Monitor operations are started by the DramaMonitor constructors.
There
are two constructors - one which starts a normal monitor and one which
starts a Forward monitor.
The normal monitor is started with the following constructor.
public DramaMonitor(
DramaPath Path, // Path to send the monitor to.
DramaMonitor.MonResponse handler, // A handler to invoke with messages
boolean SendCurrent, // Are the current values sent now ?
String parameters[]) // The parameters to monitor
throws DramaException;
Foward monitors are started with this constructor
public DramaMonitor(
DramaPath Path, // Path to send the monitor to.
String Task, // Task to foward too
String Action, // Action in Task to forward too
DramaMonitor.MonResponse handler, // A handler to invoke with messages
boolean SendCurrent, // Are the current values sent now ?
String parameters[]) // The parameters to monitor
throws DramaException;
Versions of these exist which take a single parameter
instead of an array. Additional, versions which just start the montior
but specify no parameters also exist.
DramaMonitor methods of interest are
Add()
to add a new parameter to the
list being monitored,
Delete()
to remove a parameter from the list being
monitored and
Cancel()
to cancel a monitor operation. See the class
definition for details of the arguments for these methods. Note that
these methods send DRAMA messages which peform the required interactions.
The DramaMonitor.MonResponse
class is the handler for the responses
ie. it provides a way for you to be notified of parameter value changes
and other messages involved in the monitor operation. (this is the same
role as a DramaPath.ResponseHandler class has for the
DramaPath class).
You can sub-class DramaMonitor.MonResponse to override
certain aspects of handling monitor messages.
You might want to override the following methods.
SuccessCompletion(DramaMonitor, DramaTask) throws DramaException;
ErrorCompletion(DramaMonitor, DramaTask) throws DramaException;
Started(DramaMonitor, DramaTask) throws DramaException;
Changed(DramaMonitor, DramaTask, String, Arg) throws DramaException;
DramaTask,
DramaPath,
DramaException,
DramaStatus,
Arg,
SdsID| Nested Class Summary | |
|---|---|
static class |
DramaMonitor.MonResponse
Used to handle DramaMonitor responses. |
| Field Summary | |
|---|---|
static String |
RCSID
The RCS (ACMM) ID. |
| Constructor Summary | |
|---|---|
DramaMonitor(DramaPath Path,
DramaMonitor.MonResponse MRhandler)
Constructor - Start up a monitor operation (no parameters). |
|
DramaMonitor(DramaPath Path,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String parameter)
Constructor - Start a monitor operation (single parameter). |
|
DramaMonitor(DramaPath Path,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String[] parameters)
Constructor - Start a monitor operation (multiple parameters). |
|
DramaMonitor(DramaPath Path,
String MTask,
String Action,
DramaMonitor.MonResponse MRhandler)
Constructor - Start a forward monitor operation (no parameters). |
|
DramaMonitor(DramaPath Path,
String MTask,
String Action,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String parameter)
Constructor - Start a forward monitor operation (single parameter). |
|
DramaMonitor(DramaPath Path,
String MTask,
String Action,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String[] parameters)
Constructor - Start a forward monitor operation (multiple parameters). |
|
| Method Summary | |
|---|---|
void |
Add(String Name,
DramaPath.ResponseHandler Handler)
Send a monitor ADD message to the task assocaited with this monitor. |
void |
Cancel(DramaPath.ResponseHandler handler)
Send a monitor CANCEL message to the task assocaited with this monitor. |
void |
Delete(String Name,
DramaPath.ResponseHandler handler)
Send a monitor DELETE message to the task assocaited with this monitor. |
boolean |
Error(DramaPath path,
DramaTask task)
Override of DramaPath.ResponseHandler.Error() routine - used internally to implement functionally. |
DramaPath |
Path()
Return the DRAMA Path assocaited with a monitor |
boolean |
Success(DramaPath path,
DramaTask task)
Override of DramaPath.ResponseHandler.Success() routine - used internally to implement functionally. |
boolean |
Trigger(DramaPath path,
DramaTask task)
Override of DramaPath.ResponseHandler.Trigger() routine - used internally to implement functionally. |
| Methods inherited from class au.gov.aao.drama.DramaPath.ResponseHandler |
|---|
Ers, Forget, Forgotten, Msg |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String RCSID
| Constructor Detail |
|---|
public DramaMonitor(DramaPath Path,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String[] parameters)
throws DramaException
Path - The Path of the task to send the monitor message to.
The DramaMonitor.GetPath() method must have already
been invoked and completed successfully.MRhandler - The monitor response handler to use to respond to
parameter value changed messages and other
releated DRAMA messages.SendCurrent - If true, the current values of parameters to be
monitored are sent immediately instead of waiting
for the first change.parameters - The names of parameters in the task, indicated by path,
which are to be monitored.
DramaException - Thrown on errors in the DRAMA code.
public DramaMonitor(DramaPath Path,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String parameter)
throws DramaException
Path - The Path of the task to send the monitor message to.
The DramaMonitor.GetPath() method must have already
been invoked and completed successfully.MRhandler - The monitor response handler to use to respond to
parameter value changed messages and other
releated DRAMA messages.SendCurrent - If true, the current values of parameters to be
monitored are sent immediately instead of waiting
for the first change.parameter - The name of a parameter in the task indicated by path,
which is to be monitored.
DramaException - Thrown on errors in the DRAMA code.
public DramaMonitor(DramaPath Path,
DramaMonitor.MonResponse MRhandler)
throws DramaException
Path - The Path of the task to send the monitor message to.
The DramaMonitor.GetPath() method must have already
been invoked and completed successfully.MRhandler - The monitor response handler to use to respond to
parameter value changed messages and other
releated DRAMA messages.
DramaException - Thrown on errors in the DRAMA code.
public DramaMonitor(DramaPath Path,
String MTask,
String Action,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String[] parameters)
throws DramaException
Path - The Path of the task to send the monitor message to.
The DramaMonitor.GetPath() method must have already
been invoked and completed successfully.MTask - The name of the task to send the value of the monitored
parameters too.Action - The action in MTask to invoked when the value of the
monitored parameters change.MRhandler - The monitor response handler to use to respond
releated DRAMA messages.SendCurrent - If true, the current values of parameters to be
monitored are sent immediately instead of waiting
for the first change.parameters - The names of parameters in the task, indicated by path,
which are to be monitored.
DramaException - Thrown on errors in the DRAMA code.
public DramaMonitor(DramaPath Path,
String MTask,
String Action,
DramaMonitor.MonResponse MRhandler,
boolean SendCurrent,
String parameter)
throws DramaException
Path - The Path of the task to send the monitor message to.
The DramaMonitor.GetPath() method must have already
been invoked and completed successfully.MTask - The task to send the values of the monitored
parameters too.Action - The action in MTask to invoked when the value of the
monitored parameters change.MRhandler - The monitor response handler to use to respond
releated DRAMA messages.SendCurrent - If true, the current values of parameters to be
monitored are sent immediately instead of waiting
for the first change.parameter - A single parameter in the task indicated by Path, which
is to be monitored.
DramaException - Thrown on errors in the DRAMA code.
public DramaMonitor(DramaPath Path,
String MTask,
String Action,
DramaMonitor.MonResponse MRhandler)
throws DramaException
Path - The Path of the task to send the monitor message to.
The DramaMonitor.GetPath() method must have already
been invoked and completed successfully.MTask - The task to send the values of the monitored
parameters too.Action - The action in MTask to invoked when the values of the
monitored parameters change.MRhandler - The monitor response handler to use to respond
releated DRAMA messages.
DramaException - Thrown on errors in the DRAMA code.| Method Detail |
|---|
public DramaPath Path()
public final boolean Success(DramaPath path,
DramaTask task)
throws DramaException
Success in class DramaPath.ResponseHandlerpath - The DRAMA path indicating where DRAMA task the message
is from.task - The DRAMA task which originated the message.
DramaException - Thrown on errors in the DRAMA code.
public final boolean Error(DramaPath path,
DramaTask task)
throws DramaException
Error in class DramaPath.ResponseHandlerpath - The DRAMA path indicating where DRAMA task the message
is from.task - The DRAMA task which originated the message.
DramaException - Thrown on errors in the DRAMA code.
public final boolean Trigger(DramaPath path,
DramaTask task)
throws DramaException
Trigger in class DramaPath.ResponseHandlerpath - The DRAMA path indicating where DRAMA task the message
is from.task - The DRAMA task which originated the message.
DramaException - Thrown on errors in the DRAMA code.
public void Add(String Name,
DramaPath.ResponseHandler Handler)
throws DramaException
Name - The name of the parameter to add to those being monitoredHandler - Used to handle replies to this message. See
DramaPath for details.
DramaException - Thrown on errors in the DRAMA code.
public void Delete(String Name,
DramaPath.ResponseHandler handler)
throws DramaException
Name - The name of the parameter to delete from those being
monitoredhandler - Used to handle replies to this message. See
DramaPath for details.
DramaException - Thrown on errors in the DRAMA code.
public void Cancel(DramaPath.ResponseHandler handler)
throws DramaException
handler - Used to handle replies to this message. See
DramaPath for details.
DramaException - Thrown on errors in the DRAMA code.
|
DJAVA | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Click here for the DRAMA home page and here for the AAO home page.
For more information, contact tjf@aaoepp.aao.gov.au.