Class MessageSupport

    • Field Detail

      • collaboration

        @Nonnull
        protected final it.tidalwave.actor.impl.DefaultCollaboration collaboration
    • Constructor Detail

      • MessageSupport

        protected MessageSupport()
      • MessageSupport

        protected MessageSupport​(@Nonnull
                                 Collaboration collaboration)
        Parameters:
        collaboration - the collaboration
    • Method Detail

      • send

        @Nonnull
        public Collaboration send()
        Sends this message, eventually performing a replacement (see MessageDecorator for further info).
        Returns:
        the Collaboration that this message is part of
      • sendDirectly

        @Nonnull
        public Collaboration sendDirectly()
        Sends this message directly, not performing any replacement (see MessageDecorator for further info).
        Returns:
        the Collaboration that this message is part of
      • sendLater

        @Nonnull
        public Collaboration sendLater​(@Nonnegative
                                       int delay,
                                       @Nonnull
                                       java.util.concurrent.TimeUnit timeUnit)
        Sends this message after a delay, eventually performing a replacement (see MessageDecorator for further info).
        Parameters:
        delay - the delay
        timeUnit - the TimeUnit for the delay
        Returns:
        the Collaboration that this message is part of
      • maybeAs

        @Nonnull
        public <T> java.util.Optional<T> maybeAs​(@Nonnull
                                                 java.lang.Class<? extends T> type)
        Returns the requested role or an empty Optional.
        Specified by:
        maybeAs in interface As
        Type Parameters:
        T - the static type
        Parameters:
        type - the dynamic type
        Returns:
        the optional role