com.espertech.esper.event.bean
Class BeanEventAdapter

java.lang.Object
  extended by com.espertech.esper.event.bean.BeanEventAdapter
All Implemented Interfaces:
BeanEventTypeFactory

public class BeanEventAdapter
extends java.lang.Object
implements BeanEventTypeFactory

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


Constructor Summary
BeanEventAdapter(java.util.concurrent.ConcurrentHashMap<java.lang.Class,BeanEventType> typesPerJavaBean, EventAdapterService eventAdapterService, EventTypeIdGenerator eventTypeIdGenerator)
          Ctor.
 
Method Summary
 BeanEventType createBeanType(java.lang.String name, java.lang.Class clazz, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured)
          Creates a new EventType object for a java bean of the specified class if this is the first time the class has been seen.
 BeanEventType createBeanTypeDefaultName(java.lang.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.
 BeanEventType[] getCachedTypes()
           
 ConfigurationEventTypeLegacy getClassToLegacyConfigs(java.lang.String className)
           
 Configuration.PropertyResolutionStyle getDefaultPropertyResolutionStyle()
          Gets the default property resolution style for Java class properties.
 void setClassToLegacyConfigs(java.util.Map<java.lang.String,ConfigurationEventTypeLegacy> classToLegacyConfigs)
          Set the additional mappings for legacy classes.
 void setDefaultAccessorStyle(ConfigurationEventTypeLegacy.AccessorStyle defaultAccessorStyle)
          Sets the default accessor style.
 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(java.util.concurrent.ConcurrentHashMap<java.lang.Class,BeanEventType> typesPerJavaBean,
                        EventAdapterService eventAdapterService,
                        EventTypeIdGenerator eventTypeIdGenerator)
Ctor.

Parameters:
typesPerJavaBean - shareable collection that this adapter writes to for caching bean types per class
eventAdapterService - factory for event beans and event types
Method Detail

getCachedTypes

public BeanEventType[] getCachedTypes()
Specified by:
getCachedTypes in interface BeanEventTypeFactory

setDefaultAccessorStyle

public void setDefaultAccessorStyle(ConfigurationEventTypeLegacy.AccessorStyle defaultAccessorStyle)
Sets the default accessor style.

Parameters:
defaultAccessorStyle - style to set

setClassToLegacyConfigs

public void setClassToLegacyConfigs(java.util.Map<java.lang.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

createBeanTypeDefaultName

public final BeanEventType createBeanTypeDefaultName(java.lang.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:
createBeanTypeDefaultName in interface BeanEventTypeFactory
Parameters:
clazz - is the class of the Java bean.
Returns:
EventType implementation for bean class

createBeanType

public final BeanEventType createBeanType(java.lang.String name,
                                          java.lang.Class clazz,
                                          boolean isPreconfiguredStatic,
                                          boolean isPreconfigured,
                                          boolean isConfigured)
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.
name - is the name
isPreconfiguredStatic - if from static engine config
isPreconfigured - if configured before use
isConfigured - if the class is a configuration value, false if discovered
Returns:
EventType implementation for bean class

getClassToLegacyConfigs

public ConfigurationEventTypeLegacy getClassToLegacyConfigs(java.lang.String className)

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com