org.mule.context.notification
Class CustomNotification

java.lang.Object
  extended by java.util.EventObject
      extended by org.mule.api.context.notification.ServerNotification
          extended by org.mule.context.notification.CustomNotification
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FunctionalTestNotification

public class CustomNotification
extends ServerNotification

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 abitary. 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.

See Also:
CustomNotificationListener, Serialized Form

Field Summary
 
Fields inherited from class org.mule.api.context.notification.ServerNotification
action, ADMIN_EVENT_ACTION_START_RANGE, COMPONENT_EVENT_ACTION_START_RANGE, CONNECTION_EVENT_ACTION_START_RANGE, CONTEXT_EVENT_ACTION_START_RANGE, CUSTOM_EVENT_ACTION_START_RANGE, EVENT_NAME, EXCEPTION_EVENT_ACTION_START_RANGE, MANAGEMENT_EVENT_ACTION_START_RANGE, MESSAGE_EVENT_ACTION_START_RANGE, MODEL_EVENT_ACTION_START_RANGE, NO_ACTION_ID, NO_ACTION_NAME, NULL_ACTION, NULL_MESSAGE, REGISTRY_EVENT_ACTION_START_RANGE, resourceIdentifier, ROUTING_EVENT_ACTION_START_RANGE, SECURITY_EVENT_ACTION_START_RANGE, serverId, SERVICE_EVENT_ACTION_START_RANGE, SPACE_EVENT_ACTION_START_RANGE, timestamp, TRANSACTION_EVENT_ACTION_START_RANGE, TYPE_ERROR, TYPE_FATAL, TYPE_INFO, TYPE_WARNING
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CustomNotification(Object message, int action)
          Creates a custom action event
CustomNotification(Object message, int action, String resourceId)
           
 
Method Summary
protected  String[] getActionNames()
           
 
Methods inherited from class org.mule.api.context.notification.ServerNotification
getAction, getActionId, getActionName, getActionName, getPayloadToString, getResourceIdentifier, getServerId, getTimestamp, getType, isResourceIdentifierAnUri, registerAction, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomNotification

public CustomNotification(Object message,
                          int action)
Creates a custom action event

Parameters:
message - the message to associate with the event
action - the action code for the event
Throws:
IllegalArgumentException - if the action value is less than CUSTOM_ACTION_START_RANGE

CustomNotification

public CustomNotification(Object message,
                          int action,
                          String resourceId)
Method Detail

getActionNames

protected String[] getActionNames()


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.