|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectParameterNoticeBoard.NoticeBoardMultipleListener
public abstract class NoticeBoardMultipleListener
This is an abstract class which can be used by a subclass to register potentially multiple listeners on the noticeboard and be informed whenever there is an event on one of them items in the noticeboard. When there is an event on one of the monitored parameters, all of the parameters which were registered as to be monitored will be read back from the noticeboard and sent to be processed by the subclass.
The reason that I needed something like this is that in the case of the A&G box, we have four mirrors which can be placed in and out of the optical path. However, I need a single status value which will report which of mirrors is currently in place. As each of the mirror mechanisms are completely separate, I need something that will bring the status for all of these values together so that I may set this global mirror status value.
Note that this is not part of the parameter noticeboard application but it uses the noticeboard so it was sensible to put it in the parameter noticeboard package.
Nested Class Summary | |
---|---|
(package private) class |
NoticeBoardMultipleListener.ConnectToPNBItemsTimerTask
This class will be used to connect a multiple listener to the parameter noticeboard so that it will be informed of when there is a change of one of the monitored parameters. |
Field Summary | |
---|---|
private java.util.Timer |
connectToNBItemsTimer
This is the timer which is associated with connecting to the noticeboard items in the parameter noticeboard. |
NoticeBoardMultipleListener.ConnectToPNBItemsTimerTask |
connectToPNBTimerTask
This is a timertask which will be used to connect to the parameter noticeboard in order to set up the multiple listener. |
protected org.omg.CORBA.ORB |
orb
|
protected iParameterNoticeBoard.ParameterNoticeBoardSupplier |
ParameterNoticeBoard
This is reference to the remote proxy CORBA object which will be used to access the parameter noticeboard |
java.lang.String[] |
ParametersBeingMonitored
Parameters which are currently being monitored by the class |
private iParameterNoticeBoard.ParameterNoticeBoardListener |
PNBListener
This is a listener to the parameter noticeboard and will be informed by the parameter noticeboard when any of the monitored items change. |
private boolean |
RegisteredWithNoticeboardFlag
Whether or not the class has been configured to recieve updates from the noticeboard. |
MessageHandler |
SyslogMessageHandler
This is a syslog object which will be used to report errors etc |
Constructor Summary | |
---|---|
NoticeBoardMultipleListener(MessageHandler SyslogMessageHandler,
org.omg.CORBA.ORB orb)
Constructor |
Method Summary | |
---|---|
void |
parameterChanged(java.lang.String ParameterName,
org.omg.CORBA.Any ParameterValue)
Implements the parameter changed callback which is part of the ParameterNoticeBoardListenerOperations interface and will be called when there is an event on a monitored parameter. |
abstract void |
parameterMonitorTerminated(java.lang.String Reason,
java.lang.String ParameterName)
Called by the parameter noticeboard when a susbcribed parameter has it's monitor cancelled. |
protected abstract void |
processEventData(NoticeBoardParameter[] ParameterEventData)
This is an abstract method which is to be implemented by the subclass and will result in the semantics of the parameter event being executed. |
boolean |
startMonitoringParameters(java.lang.String[] ParametersToMonitor,
org.omg.PortableServer.POA poa,
iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard)
Register with the parameter noticeboard to be called back when one of the parameters which have been specified changes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private iParameterNoticeBoard.ParameterNoticeBoardListener PNBListener
private java.util.Timer connectToNBItemsTimer
public NoticeBoardMultipleListener.ConnectToPNBItemsTimerTask connectToPNBTimerTask
public java.lang.String[] ParametersBeingMonitored
public MessageHandler SyslogMessageHandler
protected iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard
protected org.omg.CORBA.ORB orb
private boolean RegisteredWithNoticeboardFlag
Constructor Detail |
---|
public NoticeBoardMultipleListener(MessageHandler SyslogMessageHandler, org.omg.CORBA.ORB orb) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public void parameterChanged(java.lang.String ParameterName, org.omg.CORBA.Any ParameterValue)
parameterChanged
in interface iParameterNoticeBoard.ParameterNoticeBoardListenerOperations
ParameterName
- The name of the parameter that the event occured upon.ParameterValue
- The new value of the parameter.protected abstract void processEventData(NoticeBoardParameter[] ParameterEventData)
public abstract void parameterMonitorTerminated(java.lang.String Reason, java.lang.String ParameterName)
parameterMonitorTerminated
in interface iParameterNoticeBoard.ParameterNoticeBoardListenerOperations
Reason
- This is the reason that the monitor was stoppedParameterName
- This is the name of the parameterpublic boolean startMonitoringParameters(java.lang.String[] ParametersToMonitor, org.omg.PortableServer.POA poa, iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard) throws UnableToMonitorNoticeBoard
ParametersToMonitor
- These are the parameters in the
noticeboard which are to be monitored for changes.
poa
- POA so that we can register this object as a CORBA
object so that we can be informed when the monitored value
changes.
ParameterNoticeBoard
- This is a reference to the parameter noticeboard CORBA object
UnableToMonitorNoticeBoard
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |