|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectist.palcom.services.AbstractService
ist.palcom.contingency.manager.ContingencyManager
public class ContingencyManager
Implements basic logic that handles contingency events occurring on the monitored assembly. Contingency manager receives a request to monitor an assembly via getting the assembly's description from the assembly manager. Consequently, it selects resources and contingencies that will be monitored on them. Contingency manager registers listeners on the occurrence of these contingency events at the contingency monitor. In case a contingency event happens, the contingency manager will be informed and handles the event accordingly.
| Nested Class Summary | |
|---|---|
static class |
ContingencyManager.ContingencyManagerState
|
| Field Summary |
|---|
| Fields inherited from class ist.palcom.services.AbstractService |
|---|
_node, connectionsMonitor, context, info, siid |
| Fields inherited from interface ist.palcom.contingency.manager.IContingencyManager |
|---|
SERVICE_NAME, URN_SUFFIX |
| Fields inherited from interface ist.palcom.hgraph.IHgraphNode |
|---|
CHILD_NAME_CLASH, CIRCULARITY_CLASH, COMMAND_OR_NODE_MISSING, ERROR, HANDLER_MISSING, INVOKATOR_MISSING, LISTENER_MISSING, NODE_NOT_CHILD, PATH_MISSING, SIBLING_ALREADY_EXISTS, SIBLING_NONEXISTENT, SIBLING_REFERENCE_ALREADY_EXISTS, SIBLING_REFERENCE_NONEXISTENT, STATUS_OK, VALUE_ALREADY_EXISTS, VALUE_NOT_PRESENT |
| Constructor Summary | |
|---|---|
ContingencyManager(DeviceContext context,
java.lang.String serviceName)
|
|
| Method Summary | |
|---|---|
static ServiceProxy |
createServiceProxy(java.lang.String serviceName)
|
ist.palcom.contingency.manager.ContingencyManager.ContingencyThread |
getContingencyThread()
Return a thread responsible for dealing with contingency issues. |
ServiceID |
getServiceID()
|
void |
monitorAssembly(PRDAssemblyVer ai)
|
void |
putContingencyEvent(ContingencyEvent event)
Receive a contingency event for handling. |
void |
putEvent(Event event)
|
void |
registerContingencyMonitoringThread(PalcomThread t)
Register a thread that receives requests for contingency event monitoring. |
void |
registerEditCommandReceiverThread(PalcomThread t)
Register a thread that receives edit commands to apply changes to the PRDAssembly. |
void |
registerResourceDirectoryThread(PalcomThread t)
Register a thread to query for resources. |
void |
start()
Start the service. |
void |
stop()
|
void |
stopMonitoringAssembly(PRDAssemblyVer ai)
Stops monitoring the assembly. |
void |
unregisterContingencyMonitoringThread(PalcomThread t)
Unregister the thread receiving requests for contingency event monitoring. |
void |
unregisterEditCommandReceiverThread(PalcomThread t)
Unregister the thread receiving edit commands. |
void |
unregisterResourceDirectoryThread(PalcomThread t)
Unregister the thread receiving queries for resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContingencyManager(DeviceContext context,
java.lang.String serviceName)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public ServiceID getServiceID()
getServiceID in class AbstractServicepublic static ServiceProxy createServiceProxy(java.lang.String serviceName)
public void putEvent(Event event)
public void putContingencyEvent(ContingencyEvent event)
IContingencyManager
putContingencyEvent in interface IContingencyManager
public void start()
throws java.io.IOException
AbstractService
start in interface IContingencyManagerstart in class AbstractServicejava.io.IOException
public void stop()
throws java.io.IOException
stop in interface IContingencyManagerstop in class AbstractServicejava.io.IOExceptionpublic void registerEditCommandReceiverThread(PalcomThread t)
IContingencyManager
registerEditCommandReceiverThread in interface IContingencyManagert - - The receiver thread.public void unregisterEditCommandReceiverThread(PalcomThread t)
IContingencyManager
unregisterEditCommandReceiverThread in interface IContingencyManagert - - The receiver thread.public void registerContingencyMonitoringThread(PalcomThread t)
IContingencyManager
registerContingencyMonitoringThread in interface IContingencyManagert - - The receiver thread.public void unregisterContingencyMonitoringThread(PalcomThread t)
IContingencyManager
unregisterContingencyMonitoringThread in interface IContingencyManagert - - The receiver thread.public void registerResourceDirectoryThread(PalcomThread t)
IContingencyManager
registerResourceDirectoryThread in interface IContingencyManagert - - The receiver thread.public void unregisterResourceDirectoryThread(PalcomThread t)
IContingencyManager
unregisterResourceDirectoryThread in interface IContingencyManagert - - The receiver thread.public ist.palcom.contingency.manager.ContingencyManager.ContingencyThread getContingencyThread()
IContingencyManager
getContingencyThread in interface IContingencyManagerpublic void monitorAssembly(PRDAssemblyVer ai)
monitorAssembly in interface IContingencyManagerpublic void stopMonitoringAssembly(PRDAssemblyVer ai)
IContingencyManager
stopMonitoringAssembly in interface IContingencyManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||