com.sas.services.mgmt
Class ServiceEvent

com.sas.services.mgmt.ServiceEvent
All Implemented Interfaces:
java.io.Serializable

public class ServiceEvent
implements java.io.Serializable

Base class for all foundation service events.

Since:
1.0
See Also:
Serialized Form

Field Summary
static java.lang.String TYPE_SERVICE_DESTROYED
          Event notification type used to indicate that a service has been destroyed.
 
Constructor Summary
ServiceEvent(java.lang.String notificationType, java.lang.String serviceEntityId, java.lang.String message, java.io.Serializable userData)
          Constructs an instance of specifying the notification type, an optional message, and optional user data.
 
Method Summary
 java.lang.String getMessage()
          Gets message detailing an optional description of the notification event.
 java.lang.String getNotificationType()
          Gets the notification event's type.
 java.lang.String getServiceEntityId()
          Gets the notification event's entity's ID.
 java.io.Serializable getUserData()
          Gets user data that may have optionally been specified.
 java.lang.String toString()
          Gets a string representation of this event.
 

Field Detail

TYPE_SERVICE_DESTROYED

public static final java.lang.String TYPE_SERVICE_DESTROYED
Event notification type used to indicate that a service has been destroyed.

See Also:
Constant Field Values
Constructor Detail

ServiceEvent

public ServiceEvent(java.lang.String notificationType,
                    java.lang.String serviceEntityId,
                    java.lang.String message,
                    java.io.Serializable userData)
             throws java.lang.IllegalArgumentException
Constructs an instance of specifying the notification type, an optional message, and optional user data.

Parameters:
notificationType - Type of event notification.
serviceEntityId - Service's entity ID.
message - Optional message describing the event.
userData - Optional user data.
Throws:
java.lang.IllegalArgumentException - if an invalid notification type or service entity ID is specified.
Method Detail

getNotificationType

public final java.lang.String getNotificationType()
Gets the notification event's type.

Returns:
Notification event's type.

getServiceEntityId

public final java.lang.String getServiceEntityId()
Gets the notification event's entity's ID.

Returns:
Notification event's entity's ID.

getMessage

public final java.lang.String getMessage()
Gets message detailing an optional description of the notification event.

Returns:
Notification event description or null if no message has been specified.

getUserData

public final java.io.Serializable getUserData()
Gets user data that may have optionally been specified. User data must be serializable, so that it can be exchanged across JVMs if necessary.

Returns:
User data or null if no user data has been specified.

toString

public final java.lang.String toString()
Gets a string representation of this event.

Overrides:
toString in class java.lang.Object
Returns:
String representation of this event detailing:
  • notification type
  • ID of the service sending the event
  • message
  • userData



Copyright © 2009 SAS Institute Inc. All Rights Reserved.