Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Event Processing
11g Release 1 (11.1.1.9)

E14303-12
FRAMES    NO FRAMES
DETAIL:  FIELD | CONSTR | METHOD


com.bea.wlevs.ede.api
Interface EventBuilder


public interface EventBuilder

Builder for creating events of a certain event type. Defining a custom builder for an event type is necessary when the POJO representing a event does not expose the necessary setter and getter methods for the event properties. For example, if the POJO is immutable, a builder would be necessary to invoke the constructor with all of the required property values in the createEvent method since the default system builder would not be able to set the properties through reflection. An EventBuilder must only be used to build a single event. Access to a builder should also be synchronized if multiple threads are using it. Thus, a simple coding idiom for using an event builder is: EventBuilder builder = targetEventType.getEventBuilderFactory().createBuilder(); for (EventProperty property : sourceEventType.getProperties()) { Object value = property.getValue(sourceEvent); builder.put(property.getName(), value); } targetEvent = builder.createEvent();


Inner Class Summary
static interface EventBuilder.Factory
          Factory for event builder.

 

Field Summary
static java.lang.String ELEMENT_TIME
          Should the event have an element time (see CQL documentation), it is put in Builder using this constant as the property name.

 

Method Summary
 java.lang.Object createEvent()
          Instantiate an event of the type associated with this event builder.
 void put(java.lang.String property, java.lang.Object value)
          Set the property of the event being created to the specified value.

 

Field Detail

ELEMENT_TIME

public static final java.lang.String ELEMENT_TIME
Should the event have an element time (see CQL documentation), it is put in Builder using this constant as the property name.

Method Detail

put

public void put(java.lang.String property,
                java.lang.Object value)
         throws java.lang.IllegalStateException
Set the property of the event being created to the specified value. The engine first invokes a series of these methods for each property being set prior to invoking the createEvent method.
Parameters:
property - name of the property
value - value for the property
Throws:
java.lang.IllegalStateException -  

createEvent

public java.lang.Object createEvent()
Instantiate an event of the type associated with this event builder. The engine will invoke this method as the final step after all put methods have been called.
Returns:
instance of the event

Overview  Package   Class   Use  Tree  Deprecated  Index  Help 
Copyright © 2007, 2015, Oracle and/or its affiliates. All rights reserved.
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD