public interface EventTriggerAction extends StructuredDataObject
Title: Service Event Fabric Runtime
Description: An interface for implementing an Event Trigger Action
.
Copyright: Copyright (c) 2009
Company: StreamScape Technologies
DEFAULT_SERIAL_VERSION_ID
Modifier and Type | Method and Description |
---|---|
EventTriggerAction |
clone()
Obtains a clone of this object.
|
java.lang.String |
getDescription()
Returns the text description of this trigger action.
|
java.util.List |
getInboundPrototypeModelsConstraint()
Returns the prototype event that this trigger action is constrained by.
|
java.lang.String |
getName()
Returns the simple class name of this trigger implementation.
|
java.util.List |
getOutboundPrototypeModelsConstraint()
Returns the prototype event models that this trigger outbound event is constrained by.
|
java.lang.String |
getSyntax()
Returns the action script syntax supported by this implementation.
|
void |
init(FabricComponent component,
EventTriggerDefinition trigger,
java.lang.String actionScript,
RuntimeContext ctx)
Initializes the trigger action.
|
ImmutableEventDatagram |
invokeAction(ImmutableEventDatagram datagram)
Invoked by the
Event Trigger mechanism when a new actionable
event arrives. |
boolean |
supportsAdvisory() |
boolean |
supportsEvent() |
void |
validateSyntax(java.lang.String actionScript)
Validates the syntax of a specific action script.
|
getSerialVersionUID
java.lang.String getName()
java.lang.String getDescription()
void init(FabricComponent component, EventTriggerDefinition trigger, java.lang.String actionScript, RuntimeContext ctx) throws InvalidEventTriggerSyntaxException
component
- FabricComponenttrigger
- EventTriggerDefinitionactionScript
- StringInvalidEventTriggerSyntaxException
- Thrown if the script's syntax fails validation.java.lang.String getSyntax()
boolean supportsAdvisory()
boolean supportsEvent()
java.util.List getInboundPrototypeModelsConstraint()
FileEvent
events, whereas actions that log events may work with any ImmutableEventDatagram
.
An actionable event by definition also has an associate prototype that it is
constrained by. During the triggers definition and verification the actionable
event that the trigger is being added to will have it's prototype validated against
the action's Prototype Constraint. If the two don't match, a configuration exception
is raised. NULL returned by this method means there is no constraint on inbound events
(e.g. EventPublisher trigger action can take any events).java.util.List getOutboundPrototypeModelsConstraint()
AuditEvent
events, whereas FileAction that works with files can produce either FileEvent
or
BytesEvent
events.
NULL or empty list returned by this method means there is no constraint on outbound events
(e.g. EventPublisher trigger action can produce any events).void validateSyntax(java.lang.String actionScript) throws InvalidEventTriggerSyntaxException
actionScript
- StringInvalidEventTriggerSyntaxException
- Thrown if the script's syntax fails validation.ImmutableEventDatagram invokeAction(ImmutableEventDatagram datagram) throws FabricEventException
Event Trigger
mechanism when a new actionable
event arrives. The method returns the same datagram which is then processed
by the trigger mechanism. This allows the action object to pre-process the
event's content before it is coalesced and raised as an event to the fabric.
This method does not currently have the ability to override the security settings of an event datagram.
datagram
- ImmutableEventDatagramFabricEventException
EventTriggerAction clone()
clone
in interface CloneableObject
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.