Package org.drasyl.example.echo
Class EchoServer
- java.lang.Object
-
- org.drasyl.DrasylNode
-
- org.drasyl.example.echo.EchoServer
-
public class EchoServer extends DrasylNode
Starts a node that sends all received messages back to the receiver. Based on the Echo Protocol.- See Also:
EchoClient
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EchoServer(DrasylConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
void
onEvent(Event event)
-
Methods inherited from class org.drasyl.DrasylNode
getBestEventLoop, getVersion, identity, irrevocablyTerminate, pipeline, send, send, shutdown, start
-
-
-
-
Constructor Detail
-
EchoServer
protected EchoServer(DrasylConfig config) throws DrasylException
- Throws:
DrasylException
-
-
Method Detail
-
onEvent
public void onEvent(@NonNull Event event)
- Specified by:
onEvent
in classDrasylNode
-
main
public static void main(String[] args) throws DrasylException, ExecutionException, InterruptedException
-
-