Class Behaviors

    • Method Detail

      • unhandled

        public static Behavior unhandled()
        A behavior that keeps the same behavior and signals that the event was not handled (event will be logged with DEBUG level).
      • ignore

        public static Behavior ignore()
        A behavior that ignores every incoming message.
      • same

        public static Behavior same()
        A behavior that advises the system to reuse the previous behavior. This is provided in order to avoid the allocation overhead of recreating the current behavior where that is not necessary.
      • shutdown

        public static Behavior shutdown()
        A behavior that advises the system to shutdown the DrasylNode. Subsequent events will be ignored.
      • withScheduler

        public static Behavior withScheduler​(Function<Behaviors.EventScheduler,​Behavior> factory,
                                             io.reactivex.rxjava3.core.Scheduler scheduler)
        A behavior with support for scheduled self events in a node.
        Parameters:
        factory - function that returns the behavior that should react to scheduled self events
        scheduler - the Scheduler to perform scheduled events on
      • withScheduler

        public static Behavior withScheduler​(Function<Behaviors.EventScheduler,​Behavior> factory)
        A behavior with support for scheduled self events in a node.
        Parameters:
        factory - function that returns the behavior that should react to scheduled self events