DmtEvent is
used by DmtAdmin to notify registered EventListeners services about important changes. Events are generated after
every successful DMT change, and also when sessions are opened or closed. If
a DmtSession is opened in atomic mode, DMT events are only sent when
the session is committed, when the changes are actually performed.
The type of the event describes the change that triggered the event
delivery. Each event carries the unique identifier of the session in which
the described change happened or -1 when the change originated outside a
session. The events describing changes in the DMT carry the list of affected
nodes. In case of COPIED or RENAMED events, the event
carries the list of new nodes as well.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ADDED
Event type indicating nodes that were added. |
| public static final int | COPIED
Event type indicating nodes that were copied. |
| public static final int | DELETED
Event type indicating nodes that were deleted. |
| public static final int | RENAMED
Event type indicating nodes that were renamed. |
| public static final int | REPLACED
Event type indicating nodes that were replaced. |
| public static final int | SESSION_CLOSED
Event type indicating that a session was closed. |
| public static final int | SESSION_OPENED
Event type indicating that a new session was opened. |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | Returns: the array of newly created nodesThis method can be used to query the new nodes, when the type of the
event is |
| public String[] | Returns: the array of affected nodesThis method can be used to query the subject nodes of this event. |
| public Object | Returns: the requested property value or null, if the key is not contained in the propertiesthe name of the requested property key)This method can be used to get the value of a single event property. |
| public String[] | Returns: the array of property namesThis method can be used to query the names of all properties of this event. |
| public int | Returns: the unique identifier of the session that triggered the event or -1 if there is no session associatedThis method returns the identifier of the session in which this event took place. |
| public int |
| ADDED | back to summary |
|---|---|
| public static final int ADDED Event type indicating nodes that were added. | |
| COPIED | back to summary |
|---|---|
| public static final int COPIED Event type indicating nodes that were copied. | |
| DELETED | back to summary |
|---|---|
| public static final int DELETED Event type indicating nodes that were deleted. | |
| RENAMED | back to summary |
|---|---|
| public static final int RENAMED Event type indicating nodes that were renamed. | |
| REPLACED | back to summary |
|---|---|
| public static final int REPLACED Event type indicating nodes that were replaced. | |
| SESSION_CLOSED | back to summary |
|---|---|
| public static final int SESSION_CLOSED Event type indicating that a session was closed. This type of event is sent when the session is closed by the client or becomes inactive for any other reason (session timeout, fatal errors in business methods, etc.). | |
| SESSION_OPENED | back to summary |
|---|---|
| public static final int SESSION_OPENED Event type indicating that a new session was opened. | |
| getNewNodes | back to summary |
|---|---|
| public String[] getNewNodes() This method can be used to query the new nodes, when the type of the
event is
The array returned by this method runs parallel to the array returned by
This method returns only those nodes where the caller has the GET permission for the source or destination node of the operation. Therefore, it is possible that the method returns an empty array.
| |
| getNodes | back to summary |
|---|---|
| public String[] getNodes() This method can be used to query the subject nodes of this event. The
method returns
The method returns only those affected nodes that the caller has the GET
permission for (or in case of
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(String key) This method can be used to get the value of a single event property.
| |
| getPropertyNames | back to summary |
|---|---|
| public String[] getPropertyNames() This method can be used to query the names of all properties of this event.
The returned names can be used as key value in subsequent calls to
| |
| getSessionId | back to summary |
|---|---|
| public int getSessionId() This method returns the identifier of the session in which this event took place. The ID is guaranteed to be unique on a machine. For events that do not result from a session, the session id is -1.
The availability of a session.id can also be check by using
| |
| getType | back to summary |
|---|---|
| public int getType() This method returns the type of this event.
| |