|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
FourMS.FourMSCommsMonitor
class FourMSCommsMonitor
This class will monitor the time of the last communications from the 4MS module and should no comms be received from the module in the allocated time, the class will bring this to the attention of the system by creating an entry in the syslog and also setting a noticeboard item.
Field Summary | |
---|---|
private java.util.Timer |
CommsCheckTimer
This is a timer object which will be used for scheduling the checking of the comms status |
private long |
CommsTimeoutPeriod
The timeout period expressed in seconds after which the 4MS module is deemed to have timed out |
private boolean |
FirstCommsCheck
Set to true if this is the first time that we have checked the comms of the 4MS |
private MessageListener |
FourMSMessageListener
This is the object which is listening to the 4MS module and keeps a track of the time of the last communications with the 4MS module |
private boolean |
NoCommsReported
A flag which records the fact that we have reported that has been a change in the state of the timeout |
private org.omg.CORBA.ORB |
Orb
A reference to an ORB |
private iParameterNoticeBoard.ParameterNoticeBoardSupplier |
ParameterNoticeBoard
This is reference to the remote proxy CORBA object which will be used to access the parameter noticeboard |
private MessageHandler |
SyslogMessageHandler
This is a syslog object which will be used to report errors etc |
private java.lang.String |
TimeOutNBItem
This is the noticeboard item which will be updated when there is a change in the communication state with the 4MS |
Constructor Summary | |
---|---|
FourMSCommsMonitor(MessageHandler SyslogMessageHandler,
MessageListener FourMSMessageListener,
java.lang.String TimeOutNBItem,
iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard,
long CommsTimeoutPeriod,
org.omg.CORBA.ORB Orb)
Constructor |
Method Summary | |
---|---|
void |
run()
Obligation of the TimerTask interface and is used to intermittingly check the 4MS message listener to see if we the 4MS has communicated with us in the last timeout period and if not then we create an alarm in the syslog and set a parameter noticeboard item |
private void |
updateCommsStatusInNoticeBoard(boolean CommsOK)
This method will be used to update the noticeboard item which contains the state of the comms of the 4MS. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean FirstCommsCheck
private boolean NoCommsReported
private final java.util.Timer CommsCheckTimer
private MessageHandler SyslogMessageHandler
private MessageListener FourMSMessageListener
private iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard
private java.lang.String TimeOutNBItem
private long CommsTimeoutPeriod
private org.omg.CORBA.ORB Orb
Constructor Detail |
---|
FourMSCommsMonitor(MessageHandler SyslogMessageHandler, MessageListener FourMSMessageListener, java.lang.String TimeOutNBItem, iParameterNoticeBoard.ParameterNoticeBoardSupplier ParameterNoticeBoard, long CommsTimeoutPeriod, org.omg.CORBA.ORB Orb)
SyslogMessageHandler
- Used to report messages to the syslog.FourMSMessageListener
- A reference to the object which is listening to the 4MS module.TimeOutNBItem
- The noticeboard item into which we have to write the state of the comms.ParameterNoticeBoard
- A reference to the noticeboard.CommsTimeoutPeriod
- The period expressed in seconds after which the comms is deemed to have failed.Orb
- An ORBD which will be used for various CORBA related duties.Method Detail |
---|
private void updateCommsStatusInNoticeBoard(boolean CommsOK)
CommsOK
- Whether the state of the communications is good.public void run()
run
in interface java.lang.Runnable
run
in class java.util.TimerTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |