public interface IResourceEventBroker extends IEventBroker
EventBroker
PRIO_MAX, PRIO_MIN
Modifier and Type | Method and Description |
---|---|
IEventList |
getEvents(IResource resource)
Returns a list of available events for the given resource.
|
boolean |
mustSendResourceEventType(int type)
Check if the given type of a
ResourceEvent has to be sent at all. |
void |
registerForSerializedResourceEvents(IEventReceiver receiver,
SerializedResourceEventTemplate template,
IEventMapper mapping)
When this method is used instead of the
IEventBroker registration methods the broker will persist
all events in the database before delivering them to the receiver asynchronously. |
clearHoldEvents, getEvents, getHoldEvents, getMode, hold, register, register, register, register, register, resume, send, suspend, unregister, unregister
IEventList getEvents(IResource resource)
resource
- boolean mustSendResourceEventType(int type)
ResourceEvent
has to be sent at all.type
- the ResourceEvent-type to check for.true
if at least one receiver is registered for this ResourceEvent
type.void registerForSerializedResourceEvents(IEventReceiver receiver, SerializedResourceEventTemplate template, IEventMapper mapping) throws WcmException
IEventBroker
registration methods the broker will persist
all events in the database before delivering them to the receiver asynchronously. As a consequence for the receiver
the argument of the IEventReceiver.received(IEvent)
and
IEventMapper.map(IEvent)
methods will be an instance of
ISerializedResourceEvent
. Registration with this method is not supported for certain event
types and an exception is thrown: ResourceEvent.ALL
, GET
, GET_CHILDREN
,
PROPERTY_GET
and all PRE_XXX
types. A template for
serialized events has to be used which can be created from a ResourceEvent
template using this
helper method: SerializedResourceEventTemplate.createFromResourceEventTemplate(ResourceEvent)
.
A KM component / service might want to use this feature to avoid the following shortcomings of the non-persistent
asynchronous delivery: The event broker uses an event queue in memory which causes events contained in the queue
not to be delivered to the receiver if the KM system is shut down (or the j2ee engine crashes) while the queue is
not empty. Also, the memory queue has a fixed maximum size to protect the system from out-of-memory situations in
case a receiver is processing the events very slowly - but this can also cause event objects not to be delivered if
the queue is full. These problems will not occur with persistent events. As a downside the
looks different than a ISerializedResourceEvent
IResourceEvent
because it is
not possible to serialize all the attached data.
receiver
- see IEventBroker.register(IEventReceiver, IEvent, IEventMapper)
template
- see IEventBroker.register(IEventReceiver, IEvent, IEventMapper)
mapping
- see IEventBroker.register(IEventReceiver, IEvent, IEventMapper)
WcmException
- If the event type is not allowed for serialized events.Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] KMC-CM
|
[sap.com] tc/km/frwk
|
api
|
EP-KM-CM
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
Copyright 2018 SAP AG Complete Copyright Notice