public class Monitor extends EventProducer
| Modifier and Type | Field and Description |
|---|---|
protected MonitorConfiguration |
configuration |
protected static String |
DEFAULT_MODEL_KEY |
protected Map<String,EventDataRepository> |
eventDataMap |
protected static org.slf4j.Logger |
logger |
protected long |
messagePullTimeout |
protected boolean |
monitoring |
protected boolean |
printRawMessages |
protected WsmgClient |
wsmgClient |
| Constructor and Description |
|---|
Monitor(MonitorConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
MonitorConfiguration |
getConfiguration() |
EventDataRepository |
getEventData()
Deprecated.
- Use
getEventDataRepository() instead |
EventDataRepository |
getEventData(String nodeID)
Deprecated.
- Use
getEventDataRepository(...) instead |
EventDataRepository |
getEventDataRepository()
Return the event data repository containing all the notifications
|
EventDataRepository |
getEventDataRepository(String nodeID)
Return the event data repository containing all the notifications for the node
|
String |
getExperimentId()
Return the id of the experiment which the monitoring is done
|
long |
getMessagePullTimeout()
Retrieve the timeout in milliseconds for pulling messages
|
protected void |
handleNotification(org.xmlpull.infoset.XmlElement event) |
boolean |
hasCurrentExecutionTerminatedNotificationReceived() |
boolean |
isMonitoring()
is the monitoring active
|
void |
printRawMessage(boolean print)
Print the raw notification messages to the console as they arrive
|
void |
resetEventData()
Resets the graph and clear the monitoring table.
|
void |
setMessagePullTimeout(long timeout)
Set the timeout in milliseconds for pulling messages
|
void |
setPrint(boolean print)
Deprecated.
- Use
printRawMessage(...) instead |
void |
start() |
void |
startMonitoring()
Start monitoring asynchronously
|
void |
stop()
Stops monitoring without using a thread.
|
void |
stopMonitoring()
Stop monitoring asynchronously
|
void |
waitForCompletion()
Wait until the monitoring is completed
|
addEventListener, removeEventListener, sendEvent, sendSafeEventprotected static final org.slf4j.Logger logger
protected MonitorConfiguration configuration
protected static final String DEFAULT_MODEL_KEY
protected Map<String,EventDataRepository> eventDataMap
protected WsmgClient wsmgClient
protected boolean printRawMessages
protected long messagePullTimeout
protected boolean monitoring
public Monitor(MonitorConfiguration configuration)
public MonitorConfiguration getConfiguration()
public EventDataRepository getEventDataRepository()
public EventDataRepository getEventDataRepository(String nodeID)
nodeID - public void start()
throws MonitorException
MonitorExceptionpublic void stop()
throws MonitorException
MonitorExceptionpublic void startMonitoring()
public void stopMonitoring()
public void resetEventData()
protected void handleNotification(org.xmlpull.infoset.XmlElement event)
event - public void waitForCompletion()
public void printRawMessage(boolean print)
print - - if true raw notifications are printedpublic long getMessagePullTimeout()
public void setMessagePullTimeout(long timeout)
timeout - public boolean isMonitoring()
public boolean hasCurrentExecutionTerminatedNotificationReceived()
public String getExperimentId()
public EventDataRepository getEventData()
getEventDataRepository() insteadpublic EventDataRepository getEventData(String nodeID)
getEventDataRepository(...) insteadnodeID - public void setPrint(boolean print)
printRawMessage(...) insteadprint - - if true raw notifications are printedCopyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.