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:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TYPE_SERVICE_DESTROYED`
  Event notification type used to indicate that a service has been destroyed.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ServiceEvent(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 Type
  Method
  Description
  `final String`
  `getMessage()`
  Gets message detailing an optional description of the notification event.
  `final String`
  `getNotificationType()`
  Gets the notification event's type.
  `final String`
  `getServiceEntityId()`
  Gets the notification event's entity's ID.
  `final Serializable`
  `getUserData()`
  Gets user data that may have optionally been specified.
  `final String`
  `toString()`
  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_DESTROYED
    Event notification type used to indicate that a service has been destroyed.
    See Also:
      - Constant Field Values

- ## 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 `null` if 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 `null` if no user data has been specified.

  - ### toString

    public final String toString()
    Gets a string representation of this event.
    Overrides:
      `toString` in class `Object`
    Returns:
      String representation of this event detailing:
      - notification type
      - ID of the service sending the event
      - message
      - userData