public class CustomNotification extends AbstractServerNotification
CustomNotification
Custom notifications can be used by components and other objects such as routers, transformers,
agents, etc to communicate a change of state to each other. The Action value for the event is arbitary. However care should be
taken not to set the action code to an existing action code. To ensure this doesn't happen always set the action code greater
than the CUSTOM_ACTION_START_RANGE.CustomNotificationListener
,
Serialized FormNotification.Action
action, ADMIN_EVENT_ACTION_START_RANGE, ASYNC_MESSAGE_EVENT_ACTION_START_RANGE, CLUSTER_NODE_EVENT_ACTION_START_RANGE, COMPONENT_EVENT_ACTION_START_RANGE, CONNECTION_EVENT_ACTION_START_RANGE, CONTEXT_EVENT_ACTION_START_RANGE, CUSTOM_EVENT_ACTION_START_RANGE, EXCEPTION_EVENT_ACTION_START_RANGE, EXCEPTION_STRATEGY_MESSAGE_EVENT_ACTION_START_RANGE, FLOW_CONSTRUCT_EVENT_ACTION_START_RANGE, MANAGEMENT_EVENT_ACTION_START_RANGE, MESSAGE_EVENT_ACTION_START_RANGE, MESSAGE_EVENT_END_ACTION_START_RANGE, MESSAGE_PROCESSOR_EVENT_ACTION_START_RANGE, NO_ACTION_ID, NO_ACTION_NAME, NULL_ACTION, NULL_MESSAGE, PIPELINE_MESSAGE_EVENT_ACTION_START_RANGE, POLICY_MESSAGE_EVENT_ACTION_START_RANGE, REGISTRY_EVENT_ACTION_START_RANGE, resourceIdentifier, ROUTING_EVENT_ACTION_START_RANGE, SECURITY_EVENT_ACTION_START_RANGE, serverId, SPACE_EVENT_ACTION_START_RANGE, timestamp, TRANSACTION_EVENT_ACTION_START_RANGE, TYPE_ERROR, TYPE_FATAL, TYPE_INFO, TYPE_TRACE, TYPE_WARNING
source
Constructor and Description |
---|
CustomNotification(Object message,
int action)
Creates a custom action event
|
CustomNotification(Object message,
int action,
String resourceId) |
Modifier and Type | Method and Description |
---|---|
protected String[] |
getActionNames() |
String |
getEventName()
The name that identifies this particular notification type.
|
getAction, getActionId, getActionName, getActionName, getResourceIdentifier, getServerId, getTimestamp, getType, registerAction, setServerId, toString
getSource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isSynchronous
public CustomNotification(Object message, int action)
message
- the message to associate with the eventaction
- the action code for the eventIllegalArgumentException
- if the action value is less than CUSTOM_ACTION_START_RANGEprotected String[] getActionNames()
public String getEventName()
AbstractServerNotification
getEventName
in class AbstractServerNotification
Copyright © 2018. All rights reserved.