public interface EventAdapterService extends EventBeanService
Modifier and Type | Field and Description |
---|---|
static String |
ANONYMOUS_TYPE_NAME_PREFIX |
Modifier and Type | Method and Description |
---|---|
EventBean |
adapterForAvro(Object avroGenericDataDotRecord,
String eventTypeName)
Construct an event bean for a given Avro GenericData.Record using the event type name to look up the Avro event type
|
EventBean |
adapterForBean(Object theEvent)
Wrap the native event returning an
EventBean . |
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<String,Object> theEvent,
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(Object[] theEvent,
String eventTypeName)
Construct an event bean for a given Object-Array using the event type name to look up the Object-Array event type
|
EventBean |
adapterForType(Object theEvent,
EventType eventType)
Returns an adapter for an event underlying object when the event type is known.
|
EventBean |
adapterForTypedAvro(Object avroGenericDataDotRecord,
EventType eventType)
Construct an event bean for a given Avro GenericData.Record and given the Avro-event-type
|
EventBean |
adapterForTypedBean(Object bean,
EventType eventType)
Creates a thin adaper for an event object given an event type.
|
EventBean |
adapterForTypedDOM(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(Map<String,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(Object[] props,
EventType resultEventType)
Construct an event bean for a given Object-Array and given the Object-Array-event-type
|
EventBean |
adapterForTypedWrapper(EventBean theEvent,
Map<String,Object> properties,
EventType eventType)
Creata a wrapper around an event and some additional properties
|
void |
addAutoNamePackage(String javaPackageName)
Adds a Java package name of a package that Java event classes reside in.
|
EventType |
addAvroType(String eventTypeName,
ConfigurationEventTypeAvro avro,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured,
boolean isNamedWindow,
boolean isInsertInto) |
EventType |
addAvroType(String eventTypeName,
Map<String,Object> types,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured,
boolean isNamedWindow,
boolean isInsertInto,
Annotation[] annotations,
ConfigurationEventTypeAvro config,
String statementName,
String engineURI) |
EventType |
addBeanType(String eventTypeName,
Class clazz,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured)
Add an event type with the given name and Java class.
|
EventType |
addBeanType(String eventTypeName,
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(String eventTypeName,
Class clazz,
boolean isNamedWindow) |
void |
addEventRepresentation(URI eventRepURI,
PlugInEventRepresentation pluginEventRep)
Add a plug-in event representation.
|
EventType |
addNestableMapType(String eventTypeName,
Map<String,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(String eventTypeName,
Map<String,Object> propertyTypes,
ConfigurationEventTypeObjectArray typeConfig,
boolean isPreconfiguredStatic,
boolean isPreconfigured,
boolean isConfigured,
boolean namedWindow,
boolean insertInto,
boolean table,
String tableName) |
EventType |
addPlugInEventType(String name,
URI[] resolutionURIs,
Serializable initializer)
Adds a plug-in event type.
|
void |
addTypeByName(String name,
EventType eventType)
Adds an event type to the registery available for use, and originating outside as a non-adapter.
|
EventType |
addWrapperType(String eventTypeName,
EventType underlyingEventType,
Map<String,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(String eventTypeName,
ConfigurationEventTypeXMLDOM configurationEventTypeXMLDOM,
SchemaModel optionalSchemaModel,
boolean isPreconfiguredStatic)
Adds an XML DOM event type.
|
EventType |
createAnonymousAvroType(String typeName,
Map<String,Object> properties,
Annotation[] annotations,
String statementName,
String engineURI) |
EventType |
createAnonymousBeanType(String schemaName,
Class clazz) |
EventType |
createAnonymousMapType(String typeName,
Map<String,Object> propertyTypes,
boolean isTransient)
Creates a new anonymous EventType instance for an event type that contains a map of name value pairs.
|
EventType |
createAnonymousObjectArrayType(String typeName,
Map<String,Object> propertyTypes) |
EventType |
createAnonymousWrapperType(String typeName,
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.
|
EventType |
createSemiAnonymousMapType(String typeName,
Map<String,Pair<EventType,String>> taggedEventTypes,
Map<String,Pair<EventType,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(String className)
Returns the configured legacy Java class information or null if none defined.
|
Map<String,EventType> |
getDeclaredEventTypes() |
EventSender |
getDynamicTypeEventSender(EPRuntimeEventSender runtimeEventSender,
URI[] uri,
ThreadingService threadingService)
Returns an event sender that dynamically decides what the event type for a given object is.
|
EngineImportService |
getEngineImportService() |
EventAdapterAvroHandler |
getEventAdapterAvroHandler() |
EventType |
getExistsTypeByName(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,
String eventTypeName,
ThreadingService threadingService)
Returns an event sender for a specific type, only generating events of that type.
|
TypeWidenerCustomizer |
getTypeWidenerCustomizer(EventType resultEventType) |
Set<WriteablePropertyDescriptor> |
getWriteableProperties(EventType eventType,
boolean allowAnyType)
Returns descriptors for all writable properties.
|
boolean |
removeType(String eventTypeName)
Removes an event type by a given name indicating by the return value whether the type
was found or not.
|
EventType |
replaceXMLEventType(String xmlEventTypeName,
ConfigurationEventTypeXMLDOM config,
SchemaModel schemaModel) |
void |
setClassLegacyConfigs(Map<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(List<EventBean> events,
EventType targetType)
Casts event type of a list of events to either Wrapper or Map type.
|
void |
updateMapEventType(String mapEventTypeName,
Map<String,Object> typeMap)
Update a given Map event type.
|
void |
updateObjectArrayEventType(String objectArrayEventTypeName,
Map<String,Object> typeMap) |
static final String ANONYMOUS_TYPE_NAME_PREFIX
Set<WriteablePropertyDescriptor> getWriteableProperties(EventType eventType, boolean allowAnyType)
eventType
- to reflect onallowAnyType
- whether any type is allowed to be populatedEventBeanManufacturer getManufacturer(EventType eventType, WriteablePropertyDescriptor[] properties, EngineImportService engineImportService, boolean allowAnyType) throws EventBeanManufactureException
eventType
- to create underlying objects forproperties
- to writeengineImportService
- engine importsallowAnyType
- whether any type is allowed to be populatedEventBeanManufactureException
- if a factory cannot be created for the typeEventBean adapterForTypedBean(Object bean, EventType eventType)
adapterForTypedBean
in interface EventBeanService
bean
- event objecteventType
- event typevoid addTypeByName(String name, EventType eventType) throws EventAdapterException
name
- to add an event type undereventType
- the type to addEventAdapterException
- if the name is already in used by another typeEventType getExistsTypeByName(String eventTypeName)
getExistsTypeByName
in interface EventBeanService
eventTypeName
- is the event type name to return type forEventType[] getAllTypes()
EventType addNestableMapType(String eventTypeName, Map<String,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 streamisPreconfigured
- whether pre-configuredisPreconfiguredStatic
- whether statically pre-configuredEventAdapterException
- if name already exists and doesn't match property type infoEventType addWrapperType(String eventTypeName, EventType underlyingEventType, Map<String,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 streamEventAdapterException
- if name already exists and doesn't match this type's infoEventType createAnonymousMapType(String typeName, Map<String,Object> propertyTypes, boolean isTransient)
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 objectsisTransient
- transient types are not available by event type id lookup and recovery, they are always re-created on-the-flytypeName
- type nameEventBean adapterForTypedWrapper(EventBean theEvent, Map<String,Object> properties, EventType eventType)
theEvent
- is the wrapped eventproperties
- are the additional propertieseventType
- os the type metadata for any wrappers of this typeEventType addBeanType(String eventTypeName, 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 consideredisConfigured
- indicator whether from configsisPreconfigured
- indicator whether preconfiguredisPreconfiguredStatic
- indicator whether static configuredEventAdapterException
- if name already exists and doesn't match class namesEventType addBeanType(String eventTypeName, 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-configuredisPreconfigured
- indicator whether preconfiguredisPreconfiguredStatic
- indicator whether static configuredEventAdapterException
- if name already exists and doesn't match class namesEventType addBeanTypeByName(String eventTypeName, Class clazz, boolean isNamedWindow) throws EventAdapterException
EventAdapterException
EventBean adapterForBean(Object theEvent)
EventBean
.adapterForBean
in interface EventBeanService
theEvent
- to be wrappedEventBean adapterForMap(Map<String,Object> theEvent, String eventTypeName) throws EventAdapterException
EventBean
using the event type name
to identify the EventType that the event should carry.adapterForMap
in interface EventBeanService
theEvent
- to be wrappedeventTypeName
- name for the event type of the eventEventAdapterException
- if the name has not been declared, or the event cannot be wrapped using that
name's event typeEventBean adapterForObjectArray(Object[] theEvent, String eventTypeName) throws EventAdapterException
EventBeanService
adapterForObjectArray
in interface EventBeanService
theEvent
- event underlyingeventTypeName
- name of the Object-Array event typeEventAdapterException
EventBean adapterForTypedMap(Map<String,Object> properties, EventType eventType)
adapterForTypedMap
in interface EventBeanService
properties
- is key-value pairs for the event propertieseventType
- is the type metadata for any maps of that typeEventBean adapterForDOM(Node node)
adapterForDOM
in interface EventBeanService
node
- is the node to wrapEventBean adapterForTypedDOM(Node node, EventType eventType)
adapterForTypedDOM
in interface EventBeanService
node
- is the node to wrapeventType
- the event type associated with the nodeEventBean adapterForType(Object theEvent, EventType eventType)
adapterForType
in interface EventBeanService
theEvent
- underlyingeventType
- typeEventType createAnonymousWrapperType(String typeName, 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 propertiestypeName
- type nameEventAdapterException
- if name already exists and doesn't match this type's infoEventType addXMLDOMType(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 providedisPreconfiguredStatic
- preconfigured thru static configvoid setClassLegacyConfigs(Map<String,ConfigurationEventTypeLegacy> classLegacyInfo)
classLegacyInfo
- is configured legacyConfigurationEventTypeLegacy getClassLegacyConfigs(String className)
className
- is the fully-qualified class namevoid setDefaultPropertyResolutionStyle(Configuration.PropertyResolutionStyle classPropertyResolutionStyle)
classPropertyResolutionStyle
- for resolving properties.void addAutoNamePackage(String javaPackageName)
javaPackageName
- is the fully-qualified Java package name of the Java package that event classes reside inBeanEventTypeFactory getBeanEventTypeFactory()
void addEventRepresentation(URI eventRepURI, PlugInEventRepresentation pluginEventRep)
eventRepURI
- URI is the unique identifier for the event representationpluginEventRep
- is the instanceEventType addPlugInEventType(String name, URI[] resolutionURIs, 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 typeEventSender getStaticTypeEventSender(EPRuntimeEventSender runtimeEventSender, 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 serviceEventSender getDynamicTypeEventSender(EPRuntimeEventSender runtimeEventSender, 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 servicevoid updateMapEventType(String mapEventTypeName, Map<String,Object> typeMap) throws EventAdapterException
mapEventTypeName
- name to updatetypeMap
- additional properties to add, nesting allowedEventAdapterException
- when the type is not found or is not a MapEventBean[] typeCast(List<EventBean> events, EventType targetType)
events
- to casttargetType
- target typeboolean removeType(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 removeEventType createSemiAnonymousMapType(String typeName, Map<String,Pair<EventType,String>> taggedEventTypes, Map<String,Pair<EventType,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 viewstypeName
- type namevoid setDefaultAccessorStyle(ConfigurationEventTypeLegacy.AccessorStyle defaultAccessorStyle)
EventType replaceXMLEventType(String xmlEventTypeName, ConfigurationEventTypeXMLDOM config, SchemaModel schemaModel)
EventBean adapterForTypedObjectArray(Object[] props, EventType resultEventType)
EventBeanService
adapterForTypedObjectArray
in interface EventBeanService
props
- event underlyingresultEventType
- event type (Object-array only)EventType createAnonymousObjectArrayType(String typeName, Map<String,Object> propertyTypes)
EventType createAnonymousAvroType(String typeName, Map<String,Object> properties, Annotation[] annotations, String statementName, String engineURI)
EventType addNestableObjectArrayType(String eventTypeName, Map<String,Object> propertyTypes, ConfigurationEventTypeObjectArray typeConfig, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured, boolean namedWindow, boolean insertInto, boolean table, String tableName) throws EventAdapterException
EventAdapterException
void updateObjectArrayEventType(String objectArrayEventTypeName, Map<String,Object> typeMap)
EventBeanSPI getShellForType(EventType eventType)
EventBeanAdapterFactory getAdapterFactoryForType(EventType eventType)
EventType addAvroType(String eventTypeName, ConfigurationEventTypeAvro avro, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured, boolean isNamedWindow, boolean isInsertInto) throws EventAdapterException
EventAdapterException
EventType addAvroType(String eventTypeName, Map<String,Object> types, boolean isPreconfiguredStatic, boolean isPreconfigured, boolean isConfigured, boolean isNamedWindow, boolean isInsertInto, Annotation[] annotations, ConfigurationEventTypeAvro config, String statementName, String engineURI) throws EventAdapterException
EventAdapterException
EventBean adapterForAvro(Object avroGenericDataDotRecord, String eventTypeName)
EventBeanService
adapterForAvro
in interface EventBeanService
avroGenericDataDotRecord
- event underlyingeventTypeName
- name of the Avro event typeEventAdapterAvroHandler getEventAdapterAvroHandler()
EventBean adapterForTypedAvro(Object avroGenericDataDotRecord, EventType eventType)
EventBeanService
adapterForTypedAvro
in interface EventBeanService
avroGenericDataDotRecord
- event underlyingeventType
- event type (Avro only)TypeWidenerCustomizer getTypeWidenerCustomizer(EventType resultEventType)
EngineImportService getEngineImportService()