Package org.drasyl
Class ObservableDrasylNode
java.lang.Object
org.drasyl.DrasylNode
org.drasyl.ObservableDrasylNode
This particular Implementation of a drasyl Node shows exemplary how incoming Events can be
processed using the Observer Pattern.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.drasyl.DrasylNode
getBestEventLoop, getBestEventLoop, getVersion, identity, irrevocablyTerminate, pipeline, send, send, shutdown, start
-
Constructor Details
-
ObservableDrasylNode
- Throws:
DrasylException
-
ObservableDrasylNode
- Throws:
DrasylException
-
-
Method Details
-
onEvent
Description copied from class:DrasylNode
Sendsevent
to the application and tells it information about the local node, other peers, connections or incoming messages.- Specified by:
onEvent
in classDrasylNode
- Parameters:
event
- the event
-
main
- Throws:
DrasylException
-
events
-