com.espertech.esper.event
Class NaturalEventBean

java.lang.Object
  extended by com.espertech.esper.event.NaturalEventBean
All Implemented Interfaces:
EventBean

public class NaturalEventBean
extends Object
implements EventBean

An event that is carries multiple representations of event properties: A synthetic representation that is designed for delivery as EventBean to client UpdateListener code, and a natural representation as a bunch of Object-type properties for fast delivery to client subscriber objects via method call.


Constructor Summary
NaturalEventBean(EventType eventBeanType, Object[] natural, EventBean optionalSynthetic)
          Ctor.
 
Method Summary
 Object get(String property)
          Returns the value of an event property.
 EventType getEventType()
          Return the EventType instance that describes the set of properties available for this event.
 Object[] getNatural()
          Returns the column object result representation.
 EventBean getOptionalSynthetic()
          Returns the synthetic event that can be attached.
 Object getUnderlying()
          Get the underlying data object to this event wrapper.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NaturalEventBean

public NaturalEventBean(EventType eventBeanType,
                        Object[] natural,
                        EventBean optionalSynthetic)
Ctor.

Parameters:
eventBeanType - the event type of the synthetic event
natural - the properties of the event
optionalSynthetic - the event bean that is the synthetic event, or null if no synthetic is packed in
Method Detail

getEventType

public EventType getEventType()
Description copied from interface: EventBean
Return the EventType instance that describes the set of properties available for this event.

Specified by:
getEventType in interface EventBean
Returns:
event type

get

public Object get(String property)
           throws PropertyAccessException
Description copied from interface: EventBean
Returns the value of an event property.

Specified by:
get in interface EventBean
Parameters:
property - - name of the property whose value is to be retrieved
Returns:
the value of a simple property with the specified name.
Throws:
PropertyAccessException - - if there is no property of the specified name, or the property cannot be accessed

getUnderlying

public Object getUnderlying()
Description copied from interface: EventBean
Get the underlying data object to this event wrapper.

Specified by:
getUnderlying in interface EventBean
Returns:
underlying data object, usually either a Map or a Java bean instance.

getNatural

public Object[] getNatural()
Returns the column object result representation.

Returns:
select column values

getOptionalSynthetic

public EventBean getOptionalSynthetic()
Returns the synthetic event that can be attached.

Returns:
synthetic if attached, or null if none attached

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com