net.esper.event
Class BeanEventAdapter

java.lang.Object
  extended by net.esper.event.BeanEventAdapter

public class BeanEventAdapter
extends Object

A cache and factory class for obtaining EventType instances and EventBean instances for Java Bean events. The class caches EventType instances already known for performance reasons.


Constructor Summary
BeanEventAdapter(Map<String,ConfigurationEventTypeLegacy> classToLegacyConfigs)
          Ctor.
 
Method Summary
 EventBean adapterForBean(Object event)
          Returns an adapter for the given Java Bean.
 BeanEventType createOrGetBeanType(Class clazz)
          Creates a new EventType object for a java bean of the specified class if this is the first time the class has been seen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanEventAdapter

public BeanEventAdapter(Map<String,ConfigurationEventTypeLegacy> classToLegacyConfigs)
Ctor.

Parameters:
classToLegacyConfigs - us a map of event type alias to legacy event type config
Method Detail

adapterForBean

public EventBean adapterForBean(Object event)
Returns an adapter for the given Java Bean.

Parameters:
event - is the bean to wrap
Returns:
EventBean wrapping Java Bean

createOrGetBeanType

public final BeanEventType createOrGetBeanType(Class clazz)
Creates a new EventType object for a java bean of the specified class if this is the first time the class has been seen. Else uses a cached EventType instance, i.e. client classes do not need to cache.

Parameters:
clazz - is the class of the Java bean.
Returns:
EventType implementation for bean class