public interface DatagramPrototypeFactory extends DatagramPrototypeCache
Title: Structured Data Objects
Description: Defines a factory for working with event prototype objects.
DatagramPrototypeCache
where a user may check to see which prototypes exist in
the system. Once added to the cache a user may create an instance of a given event datagram by
calling one of the create methods in the DatagramFactory
and referencing the
prototype by it's model and instance names or by using it's eventId
.
These aspects are used to identify a given template event and to organize datagrams into hierarchies
of events based on their model name and ancestor type.
The ancestor type refers to a datagram's general capabilities and mutability that is, how
strict is the structure of the object. Immutable event datagrams are those whose overall structure
cannot be altered by the user. Exceptions, Advisories and similar event types are said to be
immutable because they are created once for a specific purpose and their signature will typically
not change. Mutable event datagrams may have their content, payload and properties set by the
user. Data events, row sets and similar transportable objects typically belong to this family of
datagrams. Within a given ancestor group of a particular mutability there are several types of
events. Their definition, registration and creation is handled by a group-specific DatagramFactory
.
For example, the ImmutableEventDatagram
group contains the AdvisoryEventDatagram
and the ExceptionEventDatagram
. Advisories are handled by the AdvisoryDatagramFactory
and the exceptions have an analogous interface.
The mutable EventDatagram
group contains the sub-types of EventDatagram
, DeltaEventDatagram
,
MessageDatagram
and OpaqueDatagram
. The EventDatagramFactory
facilitates a basic
interface for working with events and their associated delta objects.
Within the ancestor groups there are event types designed to transport very specific data objects.
For instance the EventDatagram
ancestor group supports DataEvent
, RowEvent
,
BytesEvent
, TextEvent
and XMLEvent
as well as other event types. Such types
are referred to as Models as they are designed to support a particular data storage, security and
communication model. Although the fabric provides a rich set of ancestors and datagram models users
may wish to extend the system by creating their own ancestor group, supplying it's datagram factory and
model instances.
Any model may further be extended by defining a model instance Prototype. A prototype typically
defines a specific signature for an event. It specifies an event-specific data type (in case of Data Events, Deltas,
Opaque types) and may add event properties and potentially payload annotations which expose portions of the
event's content as properties that may be searched and filtered by the Data Collection
and
Event Selector mechanisms. The user provides an instance for their prototype and associates an
eventId
with the given event. This allows users to refer to specific event types by their
identifier. Event id are also used as subject, topic (or event channel) names used to transmit the event
over a network. Unlike conventional messaging systems an eventId
is bound to type of event
it transmits. As such when a user selects the eventId
on which to consume events they implicitly
select the type of events to consume. Further filtering is possible by using selectors and organizing eventId
definitions into related name spaces, much like a standard publish/subscribe messaging system.
Depending on the context prototypes may be registered and persisted to application configuration storage. This
allows persistent definitions of prototypes to be dynamically loaded into the DatagramPrototypeCache
when
the program starts. Currently only the Runtime Context supports this capability. In the Client
Context users are responsible for populating up their own cache.
The prototype factory is available in both environments and allows for a similar set of calls to be used in order
to set up datagram prototypes. This interface extends the DatagramPrototypeCache
. Implementations will allow
users to work directly with prototypes and (depending on the context) with the specific configuration persistence
mechanisms instead of using the lower level DatagramFactory
interfaces specific to ancestor groups.
Supported EventDatagram
models are the following:
AcknowledgementEvent
AuditEvent
BytesEvent
DataEvent
DeltaEvent
ExceptionEvent
MailEvent
MapEvent
FileEvent
RowArrayEvent
RowChangeEvent
RowEvent
RowSetEvent
StreamEvent
StreamStateEvent
TextEvent
XMLEvent
XMPPEvent
OpaqueDatagram
models are the following:
Supported AdvisoryEventDatagram
models are the following:
Supported ExceptionEventDatagram
models are the following:
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
void |
addAdvisoryPrototype(java.lang.String eventId,
AdvisoryEventDatagram event)
Adds the specified
AdvisoryEventDatagram prototype to the environment. |
void |
addAdvisoryPrototype(java.lang.String model,
java.lang.String eventId)
Adds an
AdvisoryEventDatagram prototype to the environment. |
void |
addDataEventPrototype(java.lang.String eventId,
DataEvent event)
Adds the specified
DataEvent prototype to the environment. |
void |
addDataEventPrototype(java.lang.String eventId,
java.lang.String semanticType)
Adds a
DataEvent prototype to the environment. |
void |
addDeltaEventPrototype(java.lang.String eventId,
DeltaEvent event)
Adds the specified specified
DeltaEvent prototype to the environment. |
void |
addDeltaEventPrototype(java.lang.String eventId,
java.lang.String semanticType)
Adds a
DeltaEvent prototype to the environment. |
void |
addEventPrototype(java.lang.String eventId,
EventDatagram event)
Adds the specified
EventDatagram prototype to the environment. |
void |
addEventPrototype(java.lang.String model,
java.lang.String eventId)
Adds an
EventDatagram prototype to the environment. |
void |
addExceptionPrototype(java.lang.String eventId,
ExceptionEventDatagram event)
Adds the specified
ExceptionEventDatagram prototype to the environment. |
void |
addExceptionPrototype(java.lang.String model,
java.lang.String eventId)
Adds an
ExceptionEventDatagram prototype to the environment. |
void |
addOpaqueEventPrototype(java.lang.String eventId,
OpaqueEvent event)
Adds the specified
OpaqueEvent prototype to the environment. |
void |
addOpaqueEventPrototype(java.lang.String eventId,
java.lang.String semanticType)
Adds an
OpaqueEvent prototype to the environment. |
boolean |
existsPrototype(java.lang.String eventId)
Checks if a prototype associated with specified event id exists in the environment.
|
boolean |
isPrototypeGlobal(java.lang.String eventId)
Checks if the specified event prototype is global (replicated across the Sysplex).
|
void |
removeAdvisoryPrototype(java.lang.String eventId)
Removes the specified
AdvisoryEventDatagram prototype from the environment. |
void |
removeEventPrototype(java.lang.String eventId)
Removes the specified
EventDatagram prototype from the environment. |
void |
removeExceptionPrototype(java.lang.String eventId)
Removes the specified
ExceptionEventDatagram prototype from the environment. |
void |
removeOpaqueEventPrototype(java.lang.String eventId)
Removes the specified
OpaqueDatagram prototype from the environment. |
void |
removePrototype(java.lang.String eventId)
Removes the specified prototype from the environment.
|
void |
removePrototype(java.lang.String eventId,
boolean force)
Removes the specified prototype from the environment.
|
existsEventId, existsPrototype, getAncestor, getAncestor, getModel, getPrototypes, getPrototypesByAncestor, getPrototypesByDataType, listEventIds, listEventIdsByAncestor, listEventIdsByDataType, listEventIdsByFilter, lookupEventId, lookupPrototype
void addEventPrototype(java.lang.String model, java.lang.String eventId) throws DatagramFactoryException
EventDatagram
prototype to the environment.
model
parameter to determine the ancestor
group of the datagram.
The prototype will have an instance name which will be automatically generated using the eventId
parameter.
model
parameter.model
- the model name for the prototype.eventId
- the event id of the prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void addEventPrototype(java.lang.String eventId, EventDatagram event) throws DatagramFactoryException
EventDatagram
prototype to the environment.
eventId
parameter.
eventId
- the event id of the prototype to be added.event
- the event prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void addDataEventPrototype(java.lang.String eventId, java.lang.String semanticType) throws DatagramFactoryException
DataEvent
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.semanticType
- the name of SemanticType
of the prototype's data object.DatagramFactoryException
- if some error occurs during this operation.void addDataEventPrototype(java.lang.String eventId, DataEvent event) throws DatagramFactoryException
DataEvent
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.event
- the event prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void addDeltaEventPrototype(java.lang.String eventId, java.lang.String semanticType) throws DatagramFactoryException
DeltaEvent
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.semanticType
- the name of SemanticType
of the prototype's data object.DatagramFactoryException
- if some error occurs during this operation.void addDeltaEventPrototype(java.lang.String eventId, DeltaEvent event) throws DatagramFactoryException
DeltaEvent
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.event
- the event prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void removeEventPrototype(java.lang.String eventId) throws DatagramFactoryException
EventDatagram
prototype from the environment.
eventId
- the event id of the prototype to be removed.DatagramFactoryException
- if some error occurs during this operation.void addOpaqueEventPrototype(java.lang.String eventId, java.lang.String semanticType) throws DatagramFactoryException
OpaqueEvent
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.semanticType
- the name of SemanticType
of the prototype's data object.DatagramFactoryException
- if some error occurs during this operation.void addOpaqueEventPrototype(java.lang.String eventId, OpaqueEvent event) throws DatagramFactoryException
OpaqueEvent
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.event
- the event prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void removeOpaqueEventPrototype(java.lang.String eventId) throws DatagramFactoryException
OpaqueDatagram
prototype from the environment.
eventId
- the event id of the prototype to be removed.DatagramFactoryException
- if some error occurs during this operation.void addAdvisoryPrototype(java.lang.String model, java.lang.String eventId) throws DatagramFactoryException
AdvisoryEventDatagram
prototype to the environment.
model
parameter to determine the ancestor
group of the datagram.
The prototype will have an instance name which will be automatically generated using the eventId
parameter.model
- the model name for the prototype.eventId
- the event id of the prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void addAdvisoryPrototype(java.lang.String eventId, AdvisoryEventDatagram event) throws DatagramFactoryException
AdvisoryEventDatagram
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.event
- the event prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void removeAdvisoryPrototype(java.lang.String eventId) throws DatagramFactoryException
AdvisoryEventDatagram
prototype from the environment.
eventId
- the event id of the prototype to be removed.DatagramFactoryException
- if some error occurs during this operation.void addExceptionPrototype(java.lang.String model, java.lang.String eventId) throws DatagramFactoryException
ExceptionEventDatagram
prototype to the environment.
model
parameter to determine the ancestor
group of the datagram.
The prototype will have an instance name which will be automatically generated using the eventId
parameter.model
- the model name for the prototype.eventId
- the event id of the prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void addExceptionPrototype(java.lang.String eventId, ExceptionEventDatagram event) throws DatagramFactoryException
ExceptionEventDatagram
prototype to the environment.
eventId
parameter.eventId
- the event id of the prototype to be added.event
- the event prototype to be added.DatagramFactoryException
- if some error occurs during this operation.void removeExceptionPrototype(java.lang.String eventId) throws DatagramFactoryException
ExceptionEventDatagram
prototype from the environment.
eventId
- the event id of the prototype to be removed.DatagramFactoryException
- if some error occurs during this operation.void removePrototype(java.lang.String eventId) throws DatagramFactoryException
eventId
- the event id of the prototype to be removed.DatagramFactoryException
- if some error occurs during this operation.void removePrototype(java.lang.String eventId, boolean force) throws DatagramFactoryException
eventId
- the event id of the prototype to be removed.force
- indicates if the prototype should be removed without checking for existence of active event flows.DatagramFactoryException
- if some error occurs during this operation.boolean existsPrototype(java.lang.String eventId)
eventId
- the event id of a prototype to be checked.true
if the prototype exists, false
otherwise.boolean isPrototypeGlobal(java.lang.String eventId)
eventId
- the event id of a prototype to be checked.true
if the specified event prototype is global, false
otherwise or if the event prototype does not exist.Copyright © 2015-2024 StreamScape Technologies. All rights reserved.