com.sun.management.oss
Interface Event

All Superinterfaces:
java.lang.Cloneable, java.io.Serializable, SerializerFactory
All Known Subinterfaces:
IRPEvent, OperationalStatusDataAvailableEvent, OperationalStatusDataEvent, PerformanceDataAvailableEvent, PerformanceDataEvent
All Known Implementing Classes:
IRPEventImpl, OperationalStatusDataAvailableEventImpl, OperationalStatusDataEventImpl, PerformanceDataAvailableEventImpl, PerformanceDataEventImpl

public interface Event
extends java.io.Serializable, java.lang.Cloneable, SerializerFactory

This is the base interface for an event object in a JMS ObjectMessage payload.

If a JMS MessageListener receives such a message, the following code will run:

 public void onMessage(Message msg) {
    ObjectMessage omsg = (ObjectMessage) msg;
    Event event = (Event) omsg.getObject();
    System.out.println("New event received from " + event.getApplicationDN());
 }
 


Method Summary
 java.lang.Object clone()
          Deep copy this Event.
 java.lang.String getApplicationDN()
          Return the DN of the application sending the event.
 java.util.Date getEventTime()
          Return the time the event was published.
 void setApplicationDN(java.lang.String applicationDN)
           
 void setEventTime(java.util.Date time)
          Set the time that the event is published.
 
Methods inherited from interface com.sun.management.oss.SerializerFactory
getSupportedSerializerTypes, makeSerializer
 

Method Detail

clone

public java.lang.Object clone()
Deep copy this Event.

Returns:
deep copy of this Event.

getEventTime

public java.util.Date getEventTime()
Return the time the event was published.

Returns:
time the event was published.

setEventTime

public void setEventTime(java.util.Date time)
                  throws java.lang.IllegalArgumentException
Set the time that the event is published.

Throws:
java.lang.IllegalArgumentException

getApplicationDN

public java.lang.String getApplicationDN()
Return the DN of the application sending the event. The format of this DN is described in

Returns:
applicationDN.
Throws:
java.lang.IllegalArgumentException

setApplicationDN

public void setApplicationDN(java.lang.String applicationDN)
                      throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException