|
||||||||||
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.
Field Summary | |
---|---|
static java.lang.String |
ANONYMOUS_TYPE_NAME_PREFIX
|
Method Summary | |
---|---|
EventBean |
adapterForBean(java.lang.Object theEvent)
Wrap the native event returning an EventBean . |
EventBean |
adapterForDOM(org.w3c.dom.Node node)
Returns an adapter for the XML DOM document that exposes it's data as event properties for use in statements. |
EventBean |
adapterForMap(java.util.Map<java.lang.String,java.lang.Object> theEvent,
java.lang.String eventTypeName)
Wrap the Map-type event returning an EventBean using the event type name
to identify the EventType that the event should carry. |
EventBean |
adapterForObjectArray(java.lang.Object[] theEvent,
java.lang.String eventTypeName)
|
EventBean |
adapterForType(java.lang.Object theEvent,
EventType eventType)
Returns an adapter for an event underlying object when the event type is known. |
EventBean |
adapterForTypedBean(java.lang.Object bean,
EventType eventType)
Creates a thin adaper for an event object given an event type. |
EventBean |
adapterForTypedDOM(org.w3c.dom.Node node,
EventType eventType)
Returns an adapter for the XML DOM document that exposes it's data as event properties for use in statements. |
EventBean |
adapterForTypedMap(java.util.Map<java.lang.String,java.lang.Object> properties,
EventType eventType)
Create an event map bean from a set of event properties (name and value objectes) stored in a Map. |
EventBean |
adapterForTypedObjectArray(java.lang.Object[] props,
EventType resultEventType)
|
EventBean |
adapterForTypedWrapper(EventBean theEvent,
java.util.Map<java.lang.String,java.lang.Object> properties,
EventType eventType)
Creata a wrapper around an event and some additional properties |
void |
addAutoNamePackage(java.lang.String javaPackageName)
Adds a Java package name of a package that Java event classes reside in. |
EventType |
addBeanType(java.lang.String eventTypeName,
java.lang.Class clazz,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured)
Add an event type with the given name and Java class. |
EventType |
addBeanType(java.lang.String eventTypeName,
java.lang.String fullyQualClassName,
boolean considerAutoName,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured)
Add an event type with the given name and Java fully-qualified class name. |
EventType |
addBeanTypeByName(java.lang.String eventTypeName,
java.lang.Class clazz,
boolean isNamedWindow)
|
void |
addEventRepresentation(java.net.URI eventRepURI,
PlugInEventRepresentation pluginEventRep)
Add a plug-in event representation. |
EventType |
addNestableMapType(java.lang.String eventTypeName,
java.util.Map<java.lang.String,java.lang.Object> propertyTypes,
ConfigurationEventTypeMap optionalConfig,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured,
boolean namedWindow,
boolean insertInto)
Add an event type with the given name and a given set of properties, wherein properties may itself be Maps, nested and strongly-typed. |
EventType |
addNestableObjectArrayType(java.lang.String eventTypeName,
java.util.Map<java.lang.String,java.lang.Object> propertyTypes,
ConfigurationEventTypeObjectArray typeConfig,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured,
boolean namedWindow,
boolean insertInto,
boolean table,
java.lang.String tableName)
|
EventType |
addPlugInEventType(java.lang.String name,
java.net.URI[] resolutionURIs,
java.io.Serializable initializer)
Adds a plug-in event type. |
void |
addTypeByName(java.lang.String name,
EventType eventType)
Adds an event type to the registery available for use, and originating outside as a non-adapter. |
EventType |
addWrapperType(java.lang.String eventTypeName,
EventType underlyingEventType,
java.util.Map<java.lang.String,java.lang.Object> propertyTypes,
boolean isNamedWindow,
boolean isInsertInto)
Add an event type with the given name and the given underlying event type, as well as the additional given properties. |
EventType |
addXMLDOMType(java.lang.String eventTypeName,
ConfigurationEventTypeXMLDOM configurationEventTypeXMLDOM,
SchemaModel optionalSchemaModel,
boolean isPreconfiguredStatic)
Adds an XML DOM event type. |
EventType |
createAnonymousBeanType(java.lang.String schemaName,
java.lang.Class clazz)
|
EventType |
createAnonymousMapType(java.lang.String typeName,
java.util.Map<java.lang.String,java.lang.Object> propertyTypes)
Creates a new anonymous EventType instance for an event type that contains a map of name value pairs. |
EventType |
createAnonymousObjectArrayType(java.lang.String typeName,
java.util.Map<java.lang.String,java.lang.Object> propertyTypes)
|
EventType |
createAnonymousWrapperType(java.lang.String typeName,
EventType underlyingEventType,
java.util.Map<java.lang.String,java.lang.Object> propertyTypes)
Create a new anonymous event type with the given underlying event type, as well as the additional given properties. |
EventType |
createSemiAnonymousMapType(java.lang.String typeName,
java.util.Map<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes,
java.util.Map<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes,
boolean isUsedByChildViews)
Creates an anonymous map that has no name, however in a fail-over scenario events of this type may be recoverable and therefore the type is only semi-anonymous, identified by the tags and event type names used. |
EventBeanAdapterFactory |
getAdapterFactoryForType(EventType eventType)
|
EventType[] |
getAllTypes()
Return all known event types. |
BeanEventTypeFactory |
getBeanEventTypeFactory()
Returns a subset of the functionality of the service specific to creating POJO bean event types. |
ConfigurationEventTypeLegacy |
getClassLegacyConfigs(java.lang.String className)
Returns the configured legacy Java class information or null if none defined. |
java.util.Map<java.lang.String,EventType> |
getDeclaredEventTypes()
|
EventSender |
getDynamicTypeEventSender(EPRuntimeEventSender runtimeEventSender,
java.net.URI[] uri,
ThreadingService threadingService)
Returns an event sender that dynamically decides what the event type for a given object is. |
EventType |
getExistsTypeByName(java.lang.String eventTypeName)
Return the event type for a given event name, or null if none is registered for that name. |
EventBeanManufacturer |
getManufacturer(EventType eventType,
WriteablePropertyDescriptor[] properties,
EngineImportService engineImportService,
boolean allowAnyType)
Returns a factory for creating and populating event object instances for the given type. |
EventBeanSPI |
getShellForType(EventType eventType)
|
EventSender |
getStaticTypeEventSender(EPRuntimeEventSender runtimeEventSender,
java.lang.String eventTypeName,
ThreadingService threadingService)
Returns an event sender for a specific type, only generating events of that type. |
java.util.Set<WriteablePropertyDescriptor> |
getWriteableProperties(EventType eventType,
boolean allowAnyType)
Returns descriptors for all writable properties. |
boolean |
removeType(java.lang.String eventTypeName)
Removes an event type by a given name indicating by the return value whether the type was found or not. |
EventType |
replaceXMLEventType(java.lang.String xmlEventTypeName,
ConfigurationEventTypeXMLDOM config,
SchemaModel schemaModel)
|
void |
setClassLegacyConfigs(java.util.Map<java.lang.String,ConfigurationEventTypeLegacy> classLegacyInfo)
Sets the configured legacy Java class information. |
void |
setDefaultAccessorStyle(ConfigurationEventTypeLegacy.AccessorStyle defaultAccessorStyle)
|
void |
setDefaultPropertyResolutionStyle(Configuration.PropertyResolutionStyle classPropertyResolutionStyle)
Sets the resolution style for case-sentitivity. |
EventBean[] |
typeCast(java.util.List<EventBean> events,
EventType targetType)
Casts event type of a list of events to either Wrapper or Map type. |
void |
updateMapEventType(java.lang.String mapEventTypeName,
java.util.Map<java.lang.String,java.lang.Object> typeMap)
Update a given Map event type. |
void |
updateObjectArrayEventType(java.lang.String objectArrayEventTypeName,
java.util.Map<java.lang.String,java.lang.Object> typeMap)
|
Field Detail |
---|
static final java.lang.String ANONYMOUS_TYPE_NAME_PREFIX
Method Detail |
---|
java.util.Set<WriteablePropertyDescriptor> getWriteableProperties(EventType eventType, boolean allowAnyType)
eventType
- to reflect on
EventBeanManufacturer getManufacturer(EventType eventType, WriteablePropertyDescriptor[] properties, EngineImportService engineImportService, boolean allowAnyType) throws EventBeanManufactureException
eventType
- to create underlying objects forproperties
- to writeengineImportService
-
EventBeanManufactureException
- if a factory cannot be created for the typeEventBean adapterForTypedBean(java.lang.Object bean, EventType eventType)
bean
- event objecteventType
- event type
void addTypeByName(java.lang.String name, EventType eventType) throws EventAdapterException
name
- to add an event type undereventType
- the type to add
EventAdapterException
- if the name is already in used by another typeEventType getExistsTypeByName(java.lang.String eventTypeName)
eventTypeName
- is the event type name to return type for
EventType[] getAllTypes()
EventType addNestableMapType(java.lang.String eventTypeName, java.util.Map<java.lang.String,java.lang.Object> propertyTypes, ConfigurationEventTypeMap optionalConfig, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured, boolean namedWindow, boolean insertInto) throws EventAdapterException
If the name already exists with the same event property information, returns the existing EventType instance.
If the name already exists with different event property information, throws an exception.
If the name does not already exists, adds the name and constructs a new MapEventType
.
eventTypeName
- is the name for the event typepropertyTypes
- is the names and types of event propertiesoptionalConfig
- an optional set of Map event type names that are supertypes to the typeisConfigured
- if the type is application-configurednamedWindow
- if the type is from a named windowinsertInto
- if inserting into a stream
EventAdapterException
- if name already exists and doesn't match property type infoEventType addWrapperType(java.lang.String eventTypeName, EventType underlyingEventType, java.util.Map<java.lang.String,java.lang.Object> propertyTypes, boolean isNamedWindow, boolean isInsertInto) throws EventAdapterException
eventTypeName
- is the 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 propertiesisNamedWindow
- if the type is from a named windowisInsertInto
- if inserting into a stream
EventAdapterException
- if name already exists and doesn't match this type's infoEventType createAnonymousMapType(java.lang.String typeName, java.util.Map<java.lang.String,java.lang.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 adapterForTypedWrapper(EventBean theEvent, java.util.Map<java.lang.String,java.lang.Object> properties, EventType eventType)
theEvent
- is the wrapped eventproperties
- are the additional propertieseventType
- os the type metadata for any wrappers of this type
EventType addBeanType(java.lang.String eventTypeName, java.lang.String fullyQualClassName, boolean considerAutoName, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured) throws EventAdapterException
If the name already exists with the same class name, returns the existing EventType instance.
If the name already exists with different class name, throws an exception.
If the name does not already exists, adds the name and constructs a new BeanEventType
.
Takes into account all event-type-auto-package names supplied and attempts to resolve the class name via the packages if the direct resolution failed.
eventTypeName
- is the name for the event typefullyQualClassName
- is the fully qualified class nameconsiderAutoName
- whether auto-name by Java packages should be considered
EventAdapterException
- if name already exists and doesn't match class namesEventType addBeanType(java.lang.String eventTypeName, java.lang.Class clazz, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured) throws EventAdapterException
If the name already exists with the same Class, returns the existing EventType instance.
If the name already exists with different Class name, throws an exception.
If the name does not already exists, adds the name and constructs a new BeanEventType
.
eventTypeName
- is the name for the event typeclazz
- is the fully Java classisConfigured
- if the class is application-configured
EventAdapterException
- if name already exists and doesn't match class namesEventType addBeanTypeByName(java.lang.String eventTypeName, java.lang.Class clazz, boolean isNamedWindow) throws EventAdapterException
EventAdapterException
EventBean adapterForBean(java.lang.Object theEvent)
EventBean
.
theEvent
- to be wrapped
EventBean adapterForMap(java.util.Map<java.lang.String,java.lang.Object> theEvent, java.lang.String eventTypeName) throws EventAdapterException
EventBean
using the event type name
to identify the EventType that the event should carry.
theEvent
- to be wrappedeventTypeName
- name for the event type of the event
EventAdapterException
- if the name has not been declared, or the event cannot be wrapped using that
name's event typeEventBean adapterForObjectArray(java.lang.Object[] theEvent, java.lang.String eventTypeName) throws EventAdapterException
EventAdapterException
EventBean adapterForTypedMap(java.util.Map<java.lang.String,java.lang.Object> properties, EventType eventType)
properties
- is key-value pairs for the event propertieseventType
- is the type metadata for any maps of that type
EventBean adapterForDOM(org.w3c.dom.Node node)
node
- is the node to wrap
EventBean adapterForTypedDOM(org.w3c.dom.Node node, EventType eventType)
node
- is the node to wrapeventType
- the event type associated with the node
EventBean adapterForType(java.lang.Object theEvent, EventType eventType)
theEvent
- underlyingeventType
- type
EventType createAnonymousWrapperType(java.lang.String typeName, EventType underlyingEventType, java.util.Map<java.lang.String,java.lang.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 name already exists and doesn't match this type's infoEventType addXMLDOMType(java.lang.String eventTypeName, ConfigurationEventTypeXMLDOM configurationEventTypeXMLDOM, SchemaModel optionalSchemaModel, boolean isPreconfiguredStatic)
eventTypeName
- is the name to add the type forconfigurationEventTypeXMLDOM
- is the XML DOM config infooptionalSchemaModel
- is the object model of the schema, or null in none provided
void setClassLegacyConfigs(java.util.Map<java.lang.String,ConfigurationEventTypeLegacy> classLegacyInfo)
classLegacyInfo
- is configured legacyConfigurationEventTypeLegacy getClassLegacyConfigs(java.lang.String className)
className
- is the fully-qualified class namevoid setDefaultPropertyResolutionStyle(Configuration.PropertyResolutionStyle classPropertyResolutionStyle)
classPropertyResolutionStyle
- for resolving properties.void addAutoNamePackage(java.lang.String javaPackageName)
javaPackageName
- is the fully-qualified Java package name of the Java package that event classes reside inBeanEventTypeFactory getBeanEventTypeFactory()
void addEventRepresentation(java.net.URI eventRepURI, PlugInEventRepresentation pluginEventRep)
eventRepURI
- URI is the unique identifier for the event representationpluginEventRep
- is the instanceEventType addPlugInEventType(java.lang.String name, java.net.URI[] resolutionURIs, java.io.Serializable initializer)
name
- is the name of the event typeresolutionURIs
- is the URIs of plug-in event representations, or child URIs of suchinitializer
- is configs for the type
EventSender getStaticTypeEventSender(EPRuntimeEventSender runtimeEventSender, java.lang.String eventTypeName, ThreadingService threadingService)
runtimeEventSender
- the runtime handle for sending the wrapped typeeventTypeName
- is the name of the event type to return the sender forthreadingService
- threading service
EventSender getDynamicTypeEventSender(EPRuntimeEventSender runtimeEventSender, java.net.URI[] uri, ThreadingService threadingService)
runtimeEventSender
- the runtime handle for sending the wrapped typeuri
- is for plug-in event representations to provide implementations, if accepted, to make a wrapped eventthreadingService
- threading service
void updateMapEventType(java.lang.String mapEventTypeName, java.util.Map<java.lang.String,java.lang.Object> typeMap) throws EventAdapterException
mapEventTypeName
- name to updatetypeMap
- additional properties to add, nesting allowed
EventAdapterException
- when the type is not found or is not a MapEventBean[] typeCast(java.util.List<EventBean> events, EventType targetType)
events
- to casttargetType
- target type
boolean removeType(java.lang.String eventTypeName)
Does not uncache an existing class loaded by a JVM. Does remove XML root element names. Does not handle value-add event types.
eventTypeName
- to remove
EventType createSemiAnonymousMapType(java.lang.String typeName, java.util.Map<java.lang.String,Pair<EventType,java.lang.String>> taggedEventTypes, java.util.Map<java.lang.String,Pair<EventType,java.lang.String>> arrayEventTypes, boolean isUsedByChildViews)
taggedEventTypes
- simple type per property namearrayEventTypes
- array type per property nameisUsedByChildViews
- if the type is going to be in used by child views
void setDefaultAccessorStyle(ConfigurationEventTypeLegacy.AccessorStyle defaultAccessorStyle)
EventType replaceXMLEventType(java.lang.String xmlEventTypeName, ConfigurationEventTypeXMLDOM config, SchemaModel schemaModel)
java.util.Map<java.lang.String,EventType> getDeclaredEventTypes()
EventBean adapterForTypedObjectArray(java.lang.Object[] props, EventType resultEventType)
EventType createAnonymousObjectArrayType(java.lang.String typeName, java.util.Map<java.lang.String,java.lang.Object> propertyTypes)
EventType addNestableObjectArrayType(java.lang.String eventTypeName, java.util.Map<java.lang.String,java.lang.Object> propertyTypes, ConfigurationEventTypeObjectArray typeConfig, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured, boolean namedWindow, boolean insertInto, boolean table, java.lang.String tableName) throws EventAdapterException
EventAdapterException
void updateObjectArrayEventType(java.lang.String objectArrayEventTypeName, java.util.Map<java.lang.String,java.lang.Object> typeMap)
EventBeanSPI getShellForType(EventType eventType)
EventBeanAdapterFactory getAdapterFactoryForType(EventType eventType)
EventType createAnonymousBeanType(java.lang.String schemaName, java.lang.Class clazz)
|
© 2006-2015 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 |