|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sapportals.wcm.repository.manager.OverallResourceEventBroker
Class implementing overall resource event broker, which can be used to send and register for events for all repositories.
| Fields inherited from interface com.sapportals.wcm.util.events.IEventBroker |
PRIO_MAX, PRIO_MIN |
| Method Summary | |
IEventList |
clearHoldEvents(IEventReceiver receiver)
Remove all hold but not yet sent events for the given receiver. |
IEventList |
getEvents()
Returns a list of event templates for all possible events this broker can send (determined by querying all registered senders). |
IEventList |
getEvents(IResource resource)
Returns a list of event templates for all possible events this broker can send for the given resource (determined by querying all registered senders). |
IEventList |
getHoldEvents(IEventReceiver receiver)
Get all hold but not yet sent events for the given receiver. |
static OverallResourceEventBroker |
getInstance()
Get singleton instance of this class. |
SenderMode |
getMode(IEventReceiver receiver)
Get the receiver mode of the receiver, i.e. off, sending and so on. |
void |
hold(IEventReceiver receiver,
boolean collect)
TBD: Unknown function. |
boolean |
mustSendResourceEventType(int type)
Check if the given type of a ResourceEvent has to be
sent at all. |
void |
notify(ComponentEvent event)
Handle component add, reconfiguration or removal. |
void |
register(IEventReceiver receiver,
IEvent template)
Registers an event receiver. |
void |
register(IEventReceiver receiver,
IEvent template,
IEventMapper mapper)
See the general contract of the register(IEventReceiver, IEvent)
method. |
void |
register(IEventReceiver receiver,
IEvent template,
IEventMapper mapper,
int priority,
boolean async)
See the general contract of the register(IEventReceiver, IEvent,
IEventMapper) and register(IEventReceiver, IEvent, int, boolean)
method. |
void |
register(IEventReceiver receiver,
IEvent template,
int priority,
boolean async)
See the general contract of the register(IEventReceiver, IEvent)
method. |
void |
register(IEventSender sender)
Registers an event sender instance. |
void |
resume(IEventReceiver receiver)
Resumes a previously suspended event receiver. |
void |
send(IEvent event,
IEventSender sender)
Sends the specified event to all receivers that have registered for this kind of event. |
void |
suspend(IEventReceiver receiver)
Suspend the event receiver. |
void |
unregister(IEventReceiver receiver,
IEvent template)
Unregisteres an event receiver instance. |
void |
unregister(IEventSender sender)
Unregisteres an event sender instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static OverallResourceEventBroker getInstance()
public void notify(ComponentEvent event)
notify in interface IComponentListenerevent - CRT component event
public void send(IEvent event,
IEventSender sender)
throws WcmException
send in interface IEventBrokerevent - event to be sentsender - event sender instance sending the eventWcmException - when the event sender is not registered
public void register(IEventSender sender)
throws WcmException
register in interface IEventBrokersender - event sender to be registeredWcmException - when the registration fails
public void register(IEventReceiver receiver,
IEvent template)
throws WcmException
IEvent.isLike(IEvent) method. Usually the event's instance and
type are relevant. It is allowed to register the same event receiver
instance several times with different templates.register in interface IEventBrokerreceiver - event receiver to be registeredtemplate - event template on which the event receiver will receive
eventsWcmException - when the registration fails
public void register(IEventReceiver receiver,
IEvent template,
IEventMapper mapper)
throws WcmException
register(IEventReceiver, IEvent)
method. This regstration method has an additional IEventMapper
argument, i.e. that the mapper will be called prior to giving the event to
the receiver.register in interface IEventBrokerreceiver - event receiver to be registeredtemplate - event template on which the event receiver will receive
eventsmapper - event mapper to be called prior to giving the event to the
receiverWcmException - when the registration failsIEventMapper
public void register(IEventReceiver receiver,
IEvent template,
int priority,
boolean async)
throws WcmException
register(IEventReceiver, IEvent)
method. This regstration method has two additional arguments for priority
and asynchronous events. The priority controls the order of multible receivers which have registered for the same event(s). Receivers with higher priority (smaller values) will receive an event before receivers with lower priority (greater values).
An event receiver can choose to receive events asynchronously. This means that a dedicated event queue and sender thread is created for each receiver and template. The event sender will not be blocked, that means the send() method puts the event into the queue and returns immediatelly.
register in interface IEventBrokerreceiver - event receiver to be registeredtemplate - event template on which the event receiver will receive
eventspriority - priority of this receiver and templateasync - true when the receiver whould receive the events on a seperate
threadWcmException - when the registration fails
public void register(IEventReceiver receiver,
IEvent template,
IEventMapper mapper,
int priority,
boolean async)
throws WcmException
register(IEventReceiver, IEvent,
IEventMapper) and register(IEventReceiver, IEvent, int, boolean)
method.register in interface IEventBrokerreceiver - event receiver to be registeredtemplate - event template on which the event receiver will receive
eventsmapper - event mapper to be called prior to giving the event to the
receiverpriority - priority of this receiver and templateasync - true when the receiver whould receive the events on a seperate
threadWcmException - when the registration failsIEventMapper
public void unregister(IEventSender sender)
throws WcmException
unregister in interface IEventBrokersender - event sender to be unregisteredWcmException - when the unregistration fails
public void unregister(IEventReceiver receiver,
IEvent template)
throws WcmException
unregister in interface IEventBrokerreceiver - event receiver to be unregisteredtemplate - event template on which the event receiver will no longer
receive eventsWcmException - when the unregistration failspublic void suspend(IEventReceiver receiver)
resume(IEventReceiver) is called.suspend in interface IEventBrokerreceiver - event receiverpublic void resume(IEventReceiver receiver)
resume in interface IEventBrokerreceiver - event receiver
public void hold(IEventReceiver receiver,
boolean collect)
hold in interface IEventBrokerreceiver - TBD: Unknown parametercollect - TBD: Unknown parameterpublic SenderMode getMode(IEventReceiver receiver)
getMode in interface IEventBrokerreceiver - event receiverSenderModepublic IEventList getHoldEvents(IEventReceiver receiver)
getHoldEvents in interface IEventBrokerreceiver - event receiverpublic IEventList clearHoldEvents(IEventReceiver receiver)
clearHoldEvents in interface IEventBrokerreceiver - event receiverpublic IEventList getEvents()
getEvents in interface IEventBrokerpublic IEventList getEvents(IResource resource)
getEvents in interface IResourceEventBrokerresource - resource for which event templates should be checkedpublic boolean mustSendResourceEventType(int type)
ResourceEvent has to be
sent at all.mustSendResourceEventType in interface IResourceEventBrokertype - the ResourceEvent-type to check for.true if at least one receiver is registered for
this ResourceEvent type.
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||