java.lang.Object
it.tidalwave.actor.MessageSupport
- All Implemented Interfaces:
Collaboration.Provider,As,Serializable
- Direct Known Subclasses:
CollaborationCompletedMessage,CollaborationStartedMessage
public abstract class MessageSupport
extends Object
implements Collaboration.Provider, As, Serializable
A support class for implementing messages.
- Author:
- Fabrizio Giudici
- See Also:
- Stereotype:
- Message
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final it.tidalwave.actor.impl.DefaultCollaboration -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns theCollaborationthat this message is part of.<T> Optional<T> send()Sends this message, eventually performing a replacement (seeMessageDecoratorfor further info).Sends this message directly, not performing any replacement (seeMessageDecoratorfor further info).Sends this message after a delay, eventually performing a replacement (seeMessageDecoratorfor further info).
-
Field Details
-
collaboration
@Nonnull protected final it.tidalwave.actor.impl.DefaultCollaboration collaboration
-
-
Constructor Details
-
MessageSupport
protected MessageSupport() -
MessageSupport
- Parameters:
collaboration- the collaboration
-
-
Method Details
-
getCollaboration
Returns theCollaborationthat this message is part of.- Specified by:
getCollaborationin interfaceCollaboration.Provider- Returns:
- the
Collaboration
-
send
Sends this message, eventually performing a replacement (seeMessageDecoratorfor further info).- Returns:
- the
Collaborationthat this message is part of
-
sendDirectly
Sends this message directly, not performing any replacement (seeMessageDecoratorfor further info).- Returns:
- the
Collaborationthat this message is part of
-
sendLater
Sends this message after a delay, eventually performing a replacement (seeMessageDecoratorfor further info).- Parameters:
delay- the delaytimeUnit- theTimeUnitfor the delay- Returns:
- the
Collaborationthat this message is part of
-
maybeAs
-