Uses of Class
org.drasyl.node.behaviour.Behavior
Packages that use Behavior
-
Uses of Behavior in org.drasyl.node.behaviour
Subclasses of Behavior in org.drasyl.node.behaviourMethods in org.drasyl.node.behaviour that return BehaviorModifier and TypeMethodDescriptionDeferredBehavior.apply
(DrasylNode node) Behavior.BehaviorBuilder.build()
Build a behavior from the current state of the builder.protected abstract Behavior
BehavioralDrasylNode.created()
Returns the initialBehavior
of the node.static Behavior
Behaviors.ignore()
A behavior that ignores every incoming message.Process an incoming event and return the next behavior.static Behavior
Behaviors.same()
A behavior that advises the system to reuse the previous behavior.static Behavior
Behaviors.shutdown()
A behavior that advises the system to shutdown theDrasylNode
.static Behavior
Behaviors.unhandled()
A behavior that keeps the same behavior and signals that the event was not handled (event will be logged with DEBUG level).static Behavior
Behaviors.withScheduler
(Function<Behaviors.EventScheduler, Behavior> factory) A behavior with support for scheduled self events in a node.static Behavior
Behaviors.withScheduler
(Function<Behaviors.EventScheduler, Behavior> factory, io.netty.channel.EventLoopGroup eventLoopGroup) A behavior with support for scheduled self events in a node.Method parameters in org.drasyl.node.behaviour with type arguments of type BehaviorModifier and TypeMethodDescriptionBehavior.BehaviorBuilder.onAnyEvent
(Function<Event, Behavior> handler) Adds a new case to the event handling matching any event.Behavior.BehaviorBuilder.onAnyMessage
(BiFunction<DrasylAddress, M, Behavior> handler) Add a new case to the event handling matching anyMessageEvent
.<M extends Event>
Behavior.BehaviorBuilderAdds a new case to the event handling.<M extends Event>
Behavior.BehaviorBuilderAdds a new predicated case to the event handling.<M extends Event>
Behavior.BehaviorBuilderBehavior.BehaviorBuilder.onEventEquals
(M event, Supplier<Behavior> handler) Add a new case to the event handling matching equal events.Behavior.BehaviorBuilder.onMessage
(Class<M> messageType, BiFunction<DrasylAddress, M, Behavior> handler) Add a new case to the event handling matching events of typeMessageEvent
withMessageEvent.getPayload()
matchingmessageType
.Behavior.BehaviorBuilder.onMessage
(Class<M> messageType, BiPredicate<DrasylAddress, M> test, BiFunction<DrasylAddress, M, Behavior> handler) Add a new predicated case to the event handling matching events of typeMessageEvent
withMessageEvent.getPayload()
matchingmessageType
.Behavior.BehaviorBuilder.onMessageEquals
(DrasylAddress sender, M payload, Supplier<Behavior> handler) Add a new case to the event handling matching events of typeMessageEvent
with equalMessageEvent.getPayload()
.static Behavior
Behaviors.withScheduler
(Function<Behaviors.EventScheduler, Behavior> factory) A behavior with support for scheduled self events in a node.static Behavior
Behaviors.withScheduler
(Function<Behaviors.EventScheduler, Behavior> factory, io.netty.channel.EventLoopGroup eventLoopGroup) A behavior with support for scheduled self events in a node.Constructors in org.drasyl.node.behaviour with parameters of type BehaviorModifierConstructorDescriptionprotected
BehavioralDrasylNode
(Identity identity, io.netty.bootstrap.ServerBootstrap bootstrap, io.netty.channel.ChannelFuture channelFuture, io.netty.channel.group.ChannelGroup channels, io.netty.channel.Channel channel, Behavior behavior) Constructor parameters in org.drasyl.node.behaviour with type arguments of type Behavior