org.apache.qpid.management.wsdm.notifications
Class LifeCycleEvent

java.lang.Object
  extended by org.apache.qpid.management.wsdm.notifications.LifeCycleEvent
All Implemented Interfaces:
org.apache.muse.util.xml.XmlSerializable

public class LifeCycleEvent
extends Object
implements org.apache.muse.util.xml.XmlSerializable

Object representation of a QMan entity lifecycle event notification. Note that with entity we mean both object(s) and event(s). At the moment there are only two types of lifecycle events : CREATE and REMOVE. The first one if fired when a new instance (event or object) is created, while the second one is fired when an object instance (events are transient objects so they are not destroyed) is removed. Developer Note : The marshal & unmarshal ops could be handled using JAXB but we are not sure about the running environment (JAXB libs were included only starting from 1.6) This is the event XML representation : 16038bd5-b62b-4e86-9833-7560ed57b474 org.qpid.apache.broker session


Method Summary
static LifeCycleEvent newCreateEvent(String resourceId, String packageName, String name)
          Factory method for a new "CREATE" event.
static LifeCycleEvent newRemoveEvent(String resourceId, String packageName, String name)
          Factory method for a new "REMOVE" event.
 Element toXML()
          Returns an XML representation of this event.
 Element toXML(Document factory)
          Returns an XML representation of this event using the given input document as owner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newCreateEvent

public static LifeCycleEvent newCreateEvent(String resourceId,
                                            String packageName,
                                            String name)
Factory method for a new "CREATE" event. Builds a new "CREATE" event with the given data.

Parameters:
resourceId - resource identifier.
packageName - resource package name.
name - resource name.

newRemoveEvent

public static LifeCycleEvent newRemoveEvent(String resourceId,
                                            String packageName,
                                            String name)
Factory method for a new "REMOVE" event. Builds a new "REMOVE" event with the given data.

Parameters:
resourceId - resource identifier.
packageName - resource package name.
name - resource name.

toXML

public Element toXML()
Returns an XML representation of this event.

Specified by:
toXML in interface org.apache.muse.util.xml.XmlSerializable
Returns:
an XML representation of this event.

toXML

public Element toXML(Document factory)
Returns an XML representation of this event using the given input document as owner.

Specified by:
toXML in interface org.apache.muse.util.xml.XmlSerializable
Returns:
an XML representation of this event.


Licensed to the Apache Software Foundation