|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openbandy.test.Test
org.openbandy.example.test.EventServiceTest
public class EventServiceTest
A very simple test of the event router. This test assures that
only events of the type for which a sink has registered at the
event router are delegated. Moreover, in order to pass, this
test must check that the number of sent events corresponds with
the number of received events.
(c) Copyright Philipp Bolliger 2007, ALL RIGHTS RESERVED.
Constructor Summary | |
---|---|
EventServiceTest()
|
Method Summary | |
---|---|
void |
absorb(Event event)
This method is called by the EventService whenever it has an event this sink subscribed for. |
java.util.Vector |
getAbsorbedEventTypes()
While subscribing at the EventService, the latter will request the EventSink to state the types of Events it will absorb. |
void |
lostEventSource(java.lang.String eventShortClassName)
Using this callback, the EventService will inform subscribed sinks about the loss of the EventSource that formerly generated Events of type eventShortClassName . |
void |
run()
|
void |
setNewInstance(EventSource newEventSourceInstance)
Call-back to update a reference to an EventSource |
Methods inherited from class org.openbandy.test.Test |
---|
getName, setTestsScreen, start |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventServiceTest()
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public java.util.Vector getAbsorbedEventTypes()
EventSink
getAbsorbedEventTypes
in interface EventSink
public void absorb(Event event)
EventSink
absorb
in interface EventSink
event
- The Event that was forwarded to the sink.public void lostEventSource(java.lang.String eventShortClassName)
EventSink
eventShortClassName
.
lostEventSource
in interface EventSink
eventShortClassName
- The short class name of the Event that will not be generated no more.public void setNewInstance(EventSource newEventSourceInstance)
EventSourceOwner
setNewInstance
in interface EventSourceOwner
newEventSourceInstance
- Reference to the new Instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |