public class Router extends FilterObservable implements EventHandler
Modifier and Type | Field and Description |
---|---|
protected PortConfiguration |
config |
protected EventReceivingStrategy |
ep |
protected Port |
inPort |
protected Port |
outPort |
Constructor and Description |
---|
Router(TransportFactory f,
PortConfiguration pc) |
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
addFilter(Filter filter) |
void |
addHandler(Handler handler,
boolean wait) |
void |
deactivate() |
void |
handle(Event e) |
void |
publishSync(Event e)
Publish an
Event over the event bus. |
void |
removeFilter(Filter filter) |
void |
removeHandler(Handler handler,
boolean wait) |
addObserver, clearObservers, notifyObservers, removeObserver
protected Port inPort
protected Port outPort
protected EventReceivingStrategy ep
protected PortConfiguration config
public Router(TransportFactory f, PortConfiguration pc)
public void activate() throws InitializeException
InitializeException
public void publishSync(Event e) throws ConversionException
Event
over the event bus.e
- The Event
to be publishedConversionException
public void deactivate()
public void addFilter(Filter filter)
public void removeFilter(Filter filter)
public void addHandler(Handler handler, boolean wait)
public void removeHandler(Handler handler, boolean wait) throws java.lang.InterruptedException
java.lang.InterruptedException
public void handle(Event e)
handle
in interface EventHandler