Package com.sas.services.mgmt
Class ServiceEvent
java.lang.Object
com.sas.services.mgmt.ServiceEvent
- All Implemented Interfaces:
Serializable
public class ServiceEvent
extends Object
implements Serializable
Base class for all foundation service events.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringEvent notification type used to indicate that a service has been destroyed. -
Constructor Summary
ConstructorsConstructorDescriptionServiceEvent(String notificationType, String serviceEntityId, String message, Serializable userData) Constructs an instance of specifying the notification type, an optional message, and optional user data. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringGets message detailing an optional description of the notification event.final StringGets the notification event's type.final StringGets the notification event's entity's ID.final SerializableGets user data that may have optionally been specified.final StringtoString()Gets a string representation of this event.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
TYPE_SERVICE_DESTROYED
public static final String TYPE_SERVICE_DESTROYEDEvent notification type used to indicate that a service has been destroyed.- See Also:
-
-
Constructor Details
-
ServiceEvent
public ServiceEvent(String notificationType, String serviceEntityId, String message, Serializable userData) throws 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:
IllegalArgumentException- if an invalid notification type or service entity ID is specified.
-
-
Method Details
-
getNotificationType
public final String getNotificationType()Gets the notification event's type.- Returns:
- Notification event's type.
-
getServiceEntityId
public final String getServiceEntityId()Gets the notification event's entity's ID.- Returns:
- Notification event's entity's ID.
-
getMessage
public final String getMessage()Gets message detailing an optional description of the notification event.- Returns:
- Notification event description or
nullif no message has been specified.
-
getUserData
public final 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
nullif no user data has been specified.
-
toString
public final String toString()Gets a string representation of this event.- Overrides:
toStringin classObject- Returns:
- String representation of this event detailing:
- notification type
- ID of the service sending the event
- message
- userData
-