public class MonitorTreeModel extends Object implements Observer<MonitorManager.MonitorMessage>
Internally we use a default tree model with default mutable tree nodes where the user object is set to instances of MonitorNode, with the exception of the 'true' root of the tree in which it is set to the MonitorImpl itself
Modifier | Constructor and Description |
---|---|
protected |
MonitorTreeModel()
Protected constructor, use singleton access
getInstance()
instead. |
Modifier and Type | Method and Description |
---|---|
protected void |
addPropertiesToNode(String[] owningProcess,
Set<MonitorableProperty<?>> newProperties)
Inject properties into an existing node
|
protected void |
deregisterNode(String[] owningProcess)
Request the removal of the specified node from the monitor tree.
|
static MonitorTreeModel |
getInstance()
Get the MonitorImpl singleton
|
JTree |
getJTree()
Returns a tree view over the monitor.
|
protected DefaultTreeModel |
getMonitorTree() |
long |
getNodeRemovalDelay() |
protected DefaultMutableTreeNode |
nodeAtProcessPath(String[] owningProcess,
int limit)
Return the node pointed to by the first 'limit' number of elements in the
owning process string array.
|
void |
notify(Observable<MonitorManager.MonitorMessage> sender,
MonitorManager.MonitorMessage message)
Called by the
Observable to notify the implementing class of
changes |
protected String |
printProcess(String[] process) |
protected void |
registerNode(Object workflowObject,
String[] owningProcess,
Set<MonitorableProperty<?>> properties)
Create a new node in the monitor
|
void |
setNodeRemovalDelay(long delayTime)
Nodes will be removed at least delayTime milliseconds after their initial
deregistration request, this allows UI components to show nodes which
would otherwise vanish almost instantaneously.
|
void |
showMonitorFrame()
Very simple UI!
|
protected MonitorTreeModel()
getInstance()
instead.public static MonitorTreeModel getInstance()
public JTree getJTree()
public void notify(Observable<MonitorManager.MonitorMessage> sender, MonitorManager.MonitorMessage message) throws Exception
Observable
to notify the implementing class of
changesnotify
in interface Observer<MonitorManager.MonitorMessage>
sender
- the class where the changes have happenedmessage
- what has changedException
public void setNodeRemovalDelay(long delayTime)
delayTime
- time in milliseconds between the deregistration request and
attempt to actually remove the node in questionpublic void showMonitorFrame()
protected DefaultMutableTreeNode nodeAtProcessPath(String[] owningProcess, int limit) throws IndexOutOfBoundsException
owningProcess
- limit
- IndexOutOfBoundsException
protected void addPropertiesToNode(String[] owningProcess, Set<MonitorableProperty<?>> newProperties)
protected void deregisterNode(String[] owningProcess)
protected void registerNode(Object workflowObject, String[] owningProcess, Set<MonitorableProperty<?>> properties)
public long getNodeRemovalDelay()
protected DefaultTreeModel getMonitorTree()
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.