public class ValueAddEventServiceImpl extends Object implements ValueAddEventService
Each named window instance gets a dedicated revision processor.
Modifier and Type | Field and Description |
---|---|
protected Map<String,ValueAddEventProcessor> |
processorsByNamedWindow
Map of named window name and processor.
|
protected Map<String,RevisionSpec> |
specificationsByRevisionName
Map of revision event name and revision compiled specification.
|
protected Map<String,ValueAddEventProcessor> |
variantProcessors
Map of revision event stream and variant stream processor.
|
Constructor and Description |
---|
ValueAddEventServiceImpl()
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRevisionEventType(String revisioneventTypeName,
ConfigurationRevisionEventType config,
EventAdapterService eventAdapterService)
Adds a new revision event types.
|
void |
addVariantStream(String variantStreamname,
ConfigurationVariantStream variantStreamConfig,
EventAdapterService eventAdapterService,
EventTypeIdGenerator eventTypeIdGenerator)
Adds a new variant stream.
|
EventType |
createRevisionType(String namedWindowName,
String name,
StatementStopService statementStopService,
EventAdapterService eventAdapterService,
EventTypeIdGenerator eventTypeIdGenerator)
Upon named window creation, create a unique revision event type that this window processes.
|
EventType[] |
getValueAddedTypes()
Returns all event types representing value-add event types.
|
ValueAddEventProcessor |
getValueAddProcessor(String name)
Gets a value-added event processor.
|
EventType |
getValueAddUnderlyingType(String name)
Upon named window creation, and during resolution of type specified as part of a named window create statement,
returns looks up the revision event type name provided and return the revision event type if found, or null if not found.
|
void |
init(Map<String,ConfigurationRevisionEventType> configRevision,
Map<String,ConfigurationVariantStream> configVariant,
EventAdapterService eventAdapterService,
EventTypeIdGenerator eventTypeIdGenerator)
Called at initialization time, verifies configurations provided.
|
boolean |
isRevisionTypeName(String revisionTypeName)
Upon named window creation, check if the name used is a revision event type name.
|
protected static RevisionSpec |
validateRevision(String revisioneventTypeName,
ConfigurationRevisionEventType config,
EventAdapterService eventAdapterService)
Valiate the revision configuration.
|
static VariantSpec |
validateVariantStream(String variantStreamname,
ConfigurationVariantStream variantStreamConfig,
EventAdapterService eventAdapterService)
Validate the variant stream definition.
|
protected final Map<String,RevisionSpec> specificationsByRevisionName
protected final Map<String,ValueAddEventProcessor> processorsByNamedWindow
protected final Map<String,ValueAddEventProcessor> variantProcessors
public EventType[] getValueAddedTypes()
ValueAddEventService
getValueAddedTypes
in interface ValueAddEventService
public void init(Map<String,ConfigurationRevisionEventType> configRevision, Map<String,ConfigurationVariantStream> configVariant, EventAdapterService eventAdapterService, EventTypeIdGenerator eventTypeIdGenerator) throws ConfigurationException
ValueAddEventService
init
in interface ValueAddEventService
configRevision
- is the revision types to addconfigVariant
- is the variant streams to addeventAdapterService
- for obtaining event type information for each nameeventTypeIdGenerator
- event type id providerConfigurationException
public void addRevisionEventType(String revisioneventTypeName, ConfigurationRevisionEventType config, EventAdapterService eventAdapterService) throws ConfigurationException
ValueAddEventService
addRevisionEventType
in interface ValueAddEventService
revisioneventTypeName
- to addconfig
- the revision event type configurationeventAdapterService
- for obtaining event type information for each nameConfigurationException
public void addVariantStream(String variantStreamname, ConfigurationVariantStream variantStreamConfig, EventAdapterService eventAdapterService, EventTypeIdGenerator eventTypeIdGenerator) throws ConfigurationException
ValueAddEventService
addVariantStream
in interface ValueAddEventService
variantStreamname
- the name of the typevariantStreamConfig
- the configseventAdapterService
- for handling nested eventseventTypeIdGenerator
- event type id providerConfigurationException
- if the configuration is invalidpublic static VariantSpec validateVariantStream(String variantStreamname, ConfigurationVariantStream variantStreamConfig, EventAdapterService eventAdapterService)
variantStreamname
- the stream namevariantStreamConfig
- the configuration informationeventAdapterService
- the event adapterspublic EventType createRevisionType(String namedWindowName, String name, StatementStopService statementStopService, EventAdapterService eventAdapterService, EventTypeIdGenerator eventTypeIdGenerator)
ValueAddEventService
createRevisionType
in interface ValueAddEventService
namedWindowName
- name of windowname
- name to usestatementStopService
- for handling stopseventAdapterService
- for event type infoeventTypeIdGenerator
- event type id providerpublic ValueAddEventProcessor getValueAddProcessor(String name)
ValueAddEventService
getValueAddProcessor
in interface ValueAddEventService
name
- of the value-add eventspublic EventType getValueAddUnderlyingType(String name)
ValueAddEventService
getValueAddUnderlyingType
in interface ValueAddEventService
name
- to look uppublic boolean isRevisionTypeName(String revisionTypeName)
ValueAddEventService
isRevisionTypeName
in interface ValueAddEventService
revisionTypeName
- to checkprotected static RevisionSpec validateRevision(String revisioneventTypeName, ConfigurationRevisionEventType config, EventAdapterService eventAdapterService) throws ConfigurationException
revisioneventTypeName
- name of revision typesconfig
- configures revision typeeventAdapterService
- event adaptersConfigurationException
- if the configs are invalid