Package org.drasyl.cli.command.perf
Class PerfClientNode
- java.lang.Object
-
- org.drasyl.DrasylNode
-
- org.drasyl.behaviour.BehavioralDrasylNode
-
- org.drasyl.cli.command.perf.PerfClientNode
-
public class PerfClientNode extends BehavioralDrasylNode
Connects to aPerfServerNode
and performs a connection test.The client requests a session from the server. If the session is confirmed by the server, the client performs the performance test, and shuts down after completion.
-
-
Field Summary
Fields Modifier and Type Field Description static Duration
ONLINE_TIMEOUT
-
Constructor Summary
Constructors Constructor Description PerfClientNode(DrasylConfig config, PrintStream printStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Behavior
created()
CompletableFuture<Void>
doneFuture()
void
setTestOptions(IdentityPublicKey server, int testDuration, int messagesPerSecond, int messageSize, boolean directConnection, boolean reverse)
-
Methods inherited from class org.drasyl.behaviour.BehavioralDrasylNode
newBehaviorBuilder, onEvent
-
Methods inherited from class org.drasyl.DrasylNode
getVersion, identity, irrevocablyTerminate, pipeline, send, send, shutdown, start
-
-
-
-
Field Detail
-
ONLINE_TIMEOUT
public static final Duration ONLINE_TIMEOUT
-
-
Constructor Detail
-
PerfClientNode
public PerfClientNode(DrasylConfig config, PrintStream printStream) throws DrasylException
- Throws:
DrasylException
-
-
Method Detail
-
created
protected Behavior created()
- Specified by:
created
in classBehavioralDrasylNode
-
doneFuture
public CompletableFuture<Void> doneFuture()
-
setTestOptions
public void setTestOptions(IdentityPublicKey server, int testDuration, int messagesPerSecond, int messageSize, boolean directConnection, boolean reverse)
- Throws:
NullPointerException
- ifserver
isnull
-
-