Package it.tidalwave.actor
Class MessageSupport
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
Modifier and TypeFieldDescriptionprotected final it.tidalwave.actor.impl.DefaultCollaboration
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns theCollaboration
that this message is part of.<T> Optional
<T> send()
Sends this message, eventually performing a replacement (seeMessageDecorator
for further info).Sends this message directly, not performing any replacement (seeMessageDecorator
for further info).Sends this message after a delay, eventually performing a replacement (seeMessageDecorator
for 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 theCollaboration
that this message is part of.- Specified by:
getCollaboration
in interfaceCollaboration.Provider
- Returns:
- the
Collaboration
-
send
Sends this message, eventually performing a replacement (seeMessageDecorator
for further info).- Returns:
- the
Collaboration
that this message is part of
-
sendDirectly
Sends this message directly, not performing any replacement (seeMessageDecorator
for further info).- Returns:
- the
Collaboration
that this message is part of
-
sendLater
Sends this message after a delay, eventually performing a replacement (seeMessageDecorator
for further info).- Parameters:
delay
- the delaytimeUnit
- theTimeUnit
for the delay- Returns:
- the
Collaboration
that this message is part of
-
maybeAs
-