|
||||||||||
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(java.lang.Object event)
Wrap the native event returning an EventBean . |
EventBean |
adapterForCompositeEvent(EventType eventType,
java.util.Map<java.lang.String,EventBean> taggedEvents)
Creates a wrapper for a composite event type. |
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 event,
java.lang.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(java.lang.String eventTypeAlias,
java.lang.Class clazz)
Add an event type with the given alias and Java class. |
EventType |
addBeanType(java.lang.String eventTypeAlias,
java.lang.String fullyQualClassName)
Add an event type with the given alias and Java fully-qualified class name. |
EventType |
addMapType(java.lang.String eventTypeAlias,
java.util.Map<java.lang.String,java.lang.Class> propertyTypes)
Add an event type with the given alias and a given set of properties. |
EventType |
createAddToEventType(EventType originalType,
java.lang.String[] fieldNames,
java.lang.Class[] fieldTypes)
Create an event type based on the original type passed in adding one or more properties. |
EventType |
createAnonymousCompositeType(java.util.Map<java.lang.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(java.util.Map<java.lang.String,java.lang.Class> propertyTypes)
Creates a new anonymous EventType instance for an event type that contains a map of name value pairs. |
EventType |
createAnonymousMapTypeUnd(java.util.Map<java.lang.String,EventType> propertyTypes)
Creates a new anonymous EventType instance for an event type that contains a map of name value pairs. |
EventBean |
createMapFromUnderlying(java.util.Map<java.lang.String,EventBean> events,
EventType eventType)
Create an aggregate event wrapper bean from a set of named events stored in a Map. |
EventBean |
createMapFromValues(java.util.Map<java.lang.String,java.lang.Object> properties,
EventType eventType)
Create an event wrapper bean from a set of event properties (name and value objectes) stored in a Map. |
EventType |
getEventType(java.lang.String eventTypeAlias)
Return the event type for a given event name, or null if none is registered for that name. |
Method Detail |
---|
EventType getEventType(java.lang.String eventTypeAlias)
eventTypeAlias
- is the event type alias name to return type for
EventType addMapType(java.lang.String eventTypeAlias, java.util.Map<java.lang.String,java.lang.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 createAnonymousMapType(java.util.Map<java.lang.String,java.lang.Class> propertyTypes)
New instances are created 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(java.util.Map<java.lang.String,EventType> propertyTypes)
propertyTypes
- is a map of String to EventType objects
EventBean createMapFromValues(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 createMapFromUnderlying(java.util.Map<java.lang.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(java.lang.String eventTypeAlias, java.lang.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(java.lang.String eventTypeAlias, java.lang.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(java.lang.Object event)
EventBean
.
event
- to be wrapped
EventBean adapterForMap(java.util.Map event, java.lang.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, java.lang.String[] fieldNames, java.lang.Class[] fieldTypes)
originalType
- - event type to add property tofieldNames
- - names of propertiesfieldTypes
- - types of properties
EventBean adapterForDOM(org.w3c.dom.Node node)
node
- is the node to wrap
EventType createAnonymousCompositeType(java.util.Map<java.lang.String,EventType> taggedEventTypes)
taggedEventTypes
- is a map of name keys and event type values
EventBean adapterForCompositeEvent(EventType eventType, java.util.Map<java.lang.String,EventBean> taggedEvents)
eventType
- is the composite event typetaggedEvents
- is the name-event map
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |