net.esper.event
Class BeanEventAdapter

java.lang.Object
  extended by net.esper.event.BeanEventAdapter
All Implemented Interfaces:
BeanEventTypeFactory

public class BeanEventAdapter
extends Object
implements BeanEventTypeFactory

A fcatory for BeanEventType instances based on Java class information and using configured settings for


Constructor Summary
BeanEventAdapter(ConcurrentHashMap<Class,BeanEventType> typesPerJavaBean)
          Ctor.
 
Method Summary
 BeanEventType createBeanType(String alias, 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.
 Configuration.PropertyResolutionStyle getDefaultPropertyResolutionStyle()
          Gets the default property resolution style for Java class properties.
 void setClassToLegacyConfigs(Map<String,ConfigurationEventTypeLegacy> classToLegacyConfigs)
          Set the additional mappings for legacy classes.
 void setDefaultPropertyResolutionStyle(Configuration.PropertyResolutionStyle defaultPropertyResolutionStyle)
          Sets the default property resolution style for Java class properties.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanEventAdapter

public BeanEventAdapter(ConcurrentHashMap<Class,BeanEventType> typesPerJavaBean)
Ctor.

Parameters:
typesPerJavaBean - shareable collection that this adapter writes to for caching bean types per class
Method Detail

setClassToLegacyConfigs

public void setClassToLegacyConfigs(Map<String,ConfigurationEventTypeLegacy> classToLegacyConfigs)
Set the additional mappings for legacy classes.

Parameters:
classToLegacyConfigs - legacy class information

setDefaultPropertyResolutionStyle

public void setDefaultPropertyResolutionStyle(Configuration.PropertyResolutionStyle defaultPropertyResolutionStyle)
Sets the default property resolution style for Java class properties.

Parameters:
defaultPropertyResolutionStyle - resolution style

getDefaultPropertyResolutionStyle

public Configuration.PropertyResolutionStyle getDefaultPropertyResolutionStyle()
Gets the default property resolution style for Java class properties.

Specified by:
getDefaultPropertyResolutionStyle in interface BeanEventTypeFactory
Returns:
resolution style

createBeanType

public final BeanEventType createBeanType(String alias,
                                          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.

Specified by:
createBeanType in interface BeanEventTypeFactory
Parameters:
clazz - is the class of the Java bean.
alias - is the alias
Returns:
EventType implementation for bean class