|
||||||||||
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. |
EventType |
addBeanType(String eventTypeAlias,
Class clazz)
Add an event type with the given alias and Java class. |
EventType |
addBeanType(String eventTypeAlias,
String fullyQualClassName)
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 |
addWrapperType(String eventTypeAlias,
EventType underlyingEventType,
Map<String,Class> 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,Class> propertyTypes)
Creates a new anonymous EventType instance for an event type that contains a map of name value pairs. |
EventType |
createAnonymousMapTypeUnd(Map<String,EventType> 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,Class> propertyTypes)
Create a new anonymous event type with the given underlying event type, as well as the additional given properties. |
EventBean |
createMapFromUnderlying(Map<String,EventBean> events,
EventType eventType)
Create an aggregate event wrapper bean from a set of named events stored in a Map. |
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 |
String |
getAliasById(String eventTypeID)
Returns the first event type alias for a given event type id. |
EventType |
getExistsTypeByAlias(String eventTypeAlias)
Return the event type for a given event name, or null if none is registered for that name. |
String |
getIdByAlias(String eventTypeAlias)
Returns the event type id given an event type alias. |
String |
getIdByType(EventType eventType)
Returns the event type id given the event type, with the type expected to exist. |
EventType |
getTypeById(String eventTypeID)
Returns the event type given an event type id. |
Method Detail |
---|
String getIdByAlias(String eventTypeAlias)
Use getExistsTypeByAlias to check if an alias exists.
eventTypeAlias
- is the event name
IllegalStateException
- to indicate that the alias does not exist.EventType getTypeById(String eventTypeID)
eventTypeID
- is the tyoe id
IllegalStateException
- to indicate that the id does not exist.String getIdByType(EventType eventType)
eventType
- to return the id for
IllegalStateException
- to indicate that the type does not exist.String getAliasById(String eventTypeID)
eventTypeID
- is the type id
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 addWrapperType(String eventTypeAlias, EventType underlyingEventType, Map<String,Class> 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,Class> 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
EventType createAnonymousMapTypeUnd(Map<String,EventType> propertyTypes)
propertyTypes
- is a map of String to EventType 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
EventBean createMapFromUnderlying(Map<String,EventBean> events, EventType eventType)
events
- is key-value pairs where the key is the event name and the value is the eventeventType
- is the type metadata for any maps of that type
EventType addBeanType(String eventTypeAlias, String fullyQualClassName) 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
.
eventTypeAlias
- is the alias name for the event typefullyQualClassName
- is the fully qualified class name
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,Class> 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |