com.tibco.cep.runtime.model.event

## Interface SimpleEvent

- All Superinterfaces:
    Entity, Event

      public interface SimpleEvent
      extends Event

  Base for events that have properties and/or a payload.
  Since:
    2.0.0
  See Also:
    `TimeEvent`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `EventContext` | `getContext()` Gets the `EventContext` of this event.
    `java.lang.String` | `getDestinationURI()` Gets the URI of the default destination of this event.
    `com.tibco.xml.data.primitive.ExpandedName` | `getExpandedName()` Gets the `ExpandedName` of this event.
    `EventPayload` | `getPayload()` Gets the payload of this event.
    `java.lang.String` | `getPayloadAsString()` Gets the `String` representation of the payload of this event.
    `java.lang.Object` | `getProperty(java.lang.String name)` Gets the value of a property by name.
    `java.lang.String[]` | `getPropertyNames()` Gets all the property names in this event.
    `void` | `setContext(EventContext ctx)` Sets the `EventContext` of this event.
    `void` | `setPayload(EventPayload payload)` Sets the payload of this event.
    `void` | `setProperty(java.lang.String name, java.lang.Object value)` Sets the value of a property by name.
    `void` | `setProperty(java.lang.String name, java.lang.String value)` Sets the value of a property by name.

    - ### Methods inherited from interface com.tibco.cep.kernel.model.entity.Event

      `getTTL, hasExpiryAction, onExpiry`

    - ### Methods inherited from interface com.tibco.cep.kernel.model.entity.Entity

      `getExtId, getId`

- - ### Method Detail

    - #### setProperty

          void setProperty(java.lang.String name,
                           java.lang.Object value)

      Sets the value of a property by name.
      Parameters:
        `name` - name of the event property.
        `value` - the `Object` value to be set. The type of value must be consistent with the type defined in the model.
      Throws:
        `java.lang.NoSuchFieldException` - if there is no property in the event with the specified name.
      Since:
        2.0.0

    - #### setProperty

          void setProperty(java.lang.String name,
                           java.lang.String value)

      Sets the value of a property by name.
      Parameters:
        `name` - name of the event property.
        `value` - the `String` value to be set. The type of value must be consistent with the type defined in the model.
      Throws:
        `java.lang.NoSuchFieldException` - if there is no property in the event with the specified name.
      Since:
        2.0.0

    - #### getProperty

          java.lang.Object getProperty(java.lang.String name)

      Gets the value of a property by name.
      Parameters:
        `name` - name of the event property.
      Returns:
        the value of that property.
      Throws:
        `java.lang.NoSuchFieldException` - if there is no property in the event with the specified name.
      Since:
        2.0.0

    - #### getPropertyNames

          java.lang.String[] getPropertyNames()

      Gets all the property names in this event.
      Returns:
        all the Property names in String[]
      Since:
        2.0.0

    - #### getPayload

          EventPayload getPayload()

      Gets the payload of this event.
      Returns:
        the payload of this event, if any, else `null`.
      Since:
        2.0.0

    - #### getPayloadAsString

          java.lang.String getPayloadAsString()

      Gets the `String` representation of the payload of this event.
      Returns:
        the `String` representation of the payload of this event, if any, else `null`.
      Since:
        2.0.0

    - #### setPayload

          void setPayload(EventPayload payload)

      Sets the payload of this event.
      Parameters:
        `payload` - the `EventPayload` to set.
      Since:
        2.0.0

    - #### getContext

          EventContext getContext()

      Gets the `EventContext` of this event.
      Returns:
        the `EventContext` of this event.
      Since:
        2.0.0

    - #### setContext

          void setContext(EventContext ctx)

      Sets the `EventContext` of this event.
      Parameters:
        `ctx` - the `EventContext` to set.
      Since:
        2.0.0

    - #### getDestinationURI

          java.lang.String getDestinationURI()

      Gets the URI of the default destination of this event.
      Returns:
        the URI of the default destination of this event.
      Since:
        2.0.0

    - #### getExpandedName

          com.tibco.xml.data.primitive.ExpandedName getExpandedName()

      Gets the `ExpandedName` of this event.
      Returns:
        the `ExpandedName` of this event.
      Since:
        2.0.0