|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The event broker is a mediator between event senders (IEventSender)
and receivers (IEventReceiver). All senders and receivers must
register themselfs with a broker. All receivers will receive events from all
senders but it is possible to register for different event "templates" (event
class and type). Usually a sender will instantiate its own broker and
register itself.
| Field Summary | |
static int |
PRIO_MAX
|
static int |
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 |
getHoldEvents(IEventReceiver receiver)
Get all hold but not yet sent events for the given receiver. |
ReceiverMode |
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. |
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. |
| Field Detail |
public static final int PRIO_MAX
public static final int PRIO_MIN
| Method Detail |
public void send(IEvent event,
IEventSender sender)
throws BaseException
event - event to be sentsender - event sender instance sending the eventBaseException - when the event sender is not registered
public void register(IEventSender sender)
throws BaseException
sender - event sender to be registeredBaseException - when the registration fails
public void register(IEventReceiver receiver,
IEvent template)
throws BaseException
IEvent.isLike(com.sap.netweaver.bc.rf.util.event.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.receiver - event receiver to be registeredtemplate - event template on which the event receiver will receive
eventsBaseException - when the registration fails
public void register(IEventReceiver receiver,
IEvent template,
IEventMapper mapper)
throws BaseException
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.receiver - 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
receiverBaseException - when the registration failsIEventMapper
public void register(IEventReceiver receiver,
IEvent template,
int priority,
boolean async)
throws BaseException
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.
receiver - 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
threadBaseException - when the registration fails
public void register(IEventReceiver receiver,
IEvent template,
IEventMapper mapper,
int priority,
boolean async)
throws BaseException
register(IEventReceiver, IEvent,
IEventMapper) and register(IEventReceiver, IEvent, int, boolean)
method.receiver - 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
threadBaseException - when the registration failsIEventMapper
public void unregister(IEventSender sender)
throws BaseException
sender - event sender to be unregisteredBaseException - when the unregistration fails
public void unregister(IEventReceiver receiver,
IEvent template)
throws BaseException
receiver - event receiver to be unregisteredtemplate - event template on which the event receiver will no longer
receive eventsBaseException - when the unregistration failspublic void suspend(IEventReceiver receiver)
resume(com.sap.netweaver.bc.rf.util.event.IEventReceiver) is called.receiver - event receiverpublic void resume(IEventReceiver receiver)
receiver - event receiver
public void hold(IEventReceiver receiver,
boolean collect)
receiver - TBD: Unknown parametercollect - TBD: Unknown parameterpublic ReceiverMode getMode(IEventReceiver receiver)
receiver - event receiverReceiverModepublic IEventList getHoldEvents(IEventReceiver receiver)
receiver - event receiverpublic IEventList clearHoldEvents(IEventReceiver receiver)
receiver - event receiverpublic IEventList getEvents()
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||