|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventAdapterService
Interface for a service to resolve event names to event type.
Method Summary | |
---|---|
EventBean |
adapterForBean(Object event)
Wrap the native event returning an EventBean . |
EventBean |
adapterForCompositeEvent(EventType eventType,
Map<String,EventBean> taggedEvents)
Creates a wrapper for a composite event type. |
EventBean |
adapterForDOM(Node node)
Returns an adapter for the XML DOM document that exposes it's data as event properties for use in statements. |
EventBean |
adapterForMap(Map event,
String eventTypeAlias)
Wrap the Map-type event returning an EventBean using the event type alias name
to identify the EventType that the event should carry. |
void |
addAutoAliasPackage(String javaPackageName)
Adds a Java package name of a package that Java event classes reside in. |
EventType |
addBeanType(String eventTypeAlias,
Class clazz)
Add an event type with the given alias and Java class. |
EventType |
addBeanType(String eventTypeAlias,
String fullyQualClassName,
boolean considerAutoAlias)
Add an event type with the given alias and Java fully-qualified class name. |
EventType |
addMapType(String eventTypeAlias,
Map<String,Class> propertyTypes)
Add an event type with the given alias and a given set of properties. |
EventType |
addNestableMapType(String eventTypeAlias,
Map<String,Object> propertyTypes)
Add an event type with the given alias and a given set of properties, wherein properties may itself be Maps, nested and strongly-typed. |
EventType |
addWrapperType(String eventTypeAlias,
EventType underlyingEventType,
Map<String,Object> propertyTypes)
Add an event type with the given alias and the given underlying event type, as well as the additional given properties. |
EventType |
addXMLDOMType(String eventTypeAlias,
ConfigurationEventTypeXMLDOM configurationEventTypeXMLDOM)
Adds an XML DOM event type. |
EventType |
createAddToEventType(EventType originalType,
String[] fieldNames,
Class[] fieldTypes)
Create an event type based on the original type passed in adding one or more properties. |
EventType |
createAnonymousCompositeType(Map<String,EventType> taggedEventTypes)
Creates an unnamed composite event type with event properties that are name-value pairs with values being other event types. |
EventType |
createAnonymousMapType(Map<String,Object> propertyTypes)
Creates a new anonymous EventType instance for an event type that contains a map of name value pairs. |
EventType |
createAnonymousWrapperType(EventType underlyingEventType,
Map<String,Object> propertyTypes)
Create a new anonymous event type with the given underlying event type, as well as the additional given properties. |
EventBean |
createMapFromValues(Map<String,Object> properties,
EventType eventType)
Create an event wrapper bean from a set of event properties (name and value objectes) stored in a Map. |
EventBean |
createWrapper(EventBean event,
Map<String,Object> properties,
EventType eventType)
Creata a wrapper around an event and some additional properties |
BeanEventTypeFactory |
getBeanEventTypeFactory()
Returns a subset of the functionality of the service specific to creating POJO bean event types. |
EventType |
getExistsTypeByAlias(String eventTypeAlias)
Return the event type for a given event name, or null if none is registered for that name. |
void |
setClassLegacyConfigs(Map<String,ConfigurationEventTypeLegacy> classLegacyInfo)
Sets the configured legacy Java class information. |
void |
setDefaultPropertyResolutionStyle(Configuration.PropertyResolutionStyle classPropertyResolutionStyle)
Sets the resolution style for case-sentitivity. |
Method Detail |
---|
EventType getExistsTypeByAlias(String eventTypeAlias)
eventTypeAlias
- is the event type alias name to return type for
EventType addMapType(String eventTypeAlias, Map<String,Class> propertyTypes) throws EventAdapterException
If the alias already exists with the same event property information, returns the existing EventType instance.
If the alias already exists with different event property information, throws an exception.
If the alias does not already exists, adds the alias and constructs a new MapEventType
.
eventTypeAlias
- is the alias name for the event typepropertyTypes
- is the names and types of event properties
EventAdapterException
- if alias already exists and doesn't match property type infoEventType addNestableMapType(String eventTypeAlias, Map<String,Object> propertyTypes) throws EventAdapterException
If the alias already exists with the same event property information, returns the existing EventType instance.
If the alias already exists with different event property information, throws an exception.
If the alias does not already exists, adds the alias and constructs a new MapEventType
.
eventTypeAlias
- is the alias name for the event typepropertyTypes
- is the names and types of event properties
EventAdapterException
- if alias already exists and doesn't match property type infoEventType addWrapperType(String eventTypeAlias, EventType underlyingEventType, Map<String,Object> propertyTypes) throws EventAdapterException
eventTypeAlias
- is the alias name for the event typeunderlyingEventType
- is the event type for the event type that this wrapper wrapspropertyTypes
- is the names and types of any additional properties
EventAdapterException
- if alias already exists and doesn't match this type's infoEventType createAnonymousMapType(Map<String,Object> propertyTypes)
New instances are createdStatement by this method on every invocation. Clients to this method need to cache the returned EventType instance to reuse EventType's for same-typed events.
propertyTypes
- is a map of String to Class objects
EventBean createMapFromValues(Map<String,Object> properties, EventType eventType)
properties
- is key-value pairs for the event propertieseventType
- is the type metadata for any maps of that type
EventBean createWrapper(EventBean event, Map<String,Object> properties, EventType eventType)
event
- is the wrapped eventproperties
- are the additional propertieseventType
- os the type metadata for any wrappers of this type
EventType addBeanType(String eventTypeAlias, String fullyQualClassName, boolean considerAutoAlias) throws EventAdapterException
If the alias already exists with the same class name, returns the existing EventType instance.
If the alias already exists with different class name, throws an exception.
If the alias does not already exists, adds the alias and constructs a new BeanEventType
.
Takes into account all event-type-auto-alias-package names supplied and attempts to resolve the class name via the packages if the direct resolution failed.
eventTypeAlias
- is the alias name for the event typefullyQualClassName
- is the fully qualified class nameconsiderAutoAlias
- whether auto-alias by Java packages should be considered
EventAdapterException
- if alias already exists and doesn't match class namesEventType addBeanType(String eventTypeAlias, Class clazz) throws EventAdapterException
If the alias already exists with the same Class, returns the existing EventType instance.
If the alias already exists with different Class name, throws an exception.
If the alias does not already exists, adds the alias and constructs a new BeanEventType
.
eventTypeAlias
- is the alias name for the event typeclazz
- is the fully Java class
EventAdapterException
- if alias already exists and doesn't match class namesEventBean adapterForBean(Object event)
EventBean
.
event
- to be wrapped
EventBean adapterForMap(Map event, String eventTypeAlias) throws EventAdapterException
EventBean
using the event type alias name
to identify the EventType that the event should carry.
event
- to be wrappedeventTypeAlias
- alias for the event type of the event
EventAdapterException
- if the alias has not been declared, or the event cannot be wrapped using that
alias's event typeEventType createAddToEventType(EventType originalType, String[] fieldNames, Class[] fieldTypes)
originalType
- - event type to add property tofieldNames
- - names of propertiesfieldTypes
- - types of properties
EventBean adapterForDOM(Node node)
node
- is the node to wrap
EventType createAnonymousCompositeType(Map<String,EventType> taggedEventTypes)
taggedEventTypes
- is a map of name keys and event type values
EventBean adapterForCompositeEvent(EventType eventType, Map<String,EventBean> taggedEvents)
eventType
- is the composite event typetaggedEvents
- is the name-event map
EventType createAnonymousWrapperType(EventType underlyingEventType, Map<String,Object> propertyTypes) throws EventAdapterException
underlyingEventType
- is the event type for the event type that this wrapper wrapspropertyTypes
- is the names and types of any additional properties
EventAdapterException
- if alias already exists and doesn't match this type's infoEventType addXMLDOMType(String eventTypeAlias, ConfigurationEventTypeXMLDOM configurationEventTypeXMLDOM)
eventTypeAlias
- is the alias to add the type forconfigurationEventTypeXMLDOM
- is the XML DOM config info
void setClassLegacyConfigs(Map<String,ConfigurationEventTypeLegacy> classLegacyInfo)
classLegacyInfo
- is configured legacyvoid setDefaultPropertyResolutionStyle(Configuration.PropertyResolutionStyle classPropertyResolutionStyle)
classPropertyResolutionStyle
- for resolving properties.void addAutoAliasPackage(String javaPackageName)
javaPackageName
- is the fully-qualified Java package name of the Java package that event classes reside inBeanEventTypeFactory getBeanEventTypeFactory()
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |