Package org.simplesim.core.messaging
Class AbstractMessage<A>
java.lang.Object
org.simplesim.core.messaging.AbstractMessage<A>
- Type Parameters:
A
- type of addressing
- Direct Known Subclasses:
Message
,RoutingMessage
Abstract base class for messages that are sent from one port to another.
Messages always contain a content and may be extended with additional features. If agents are
connected directly, the destination can be omitted and set to null
.
Note: This class is immutable and thus thread-safe.
- See Also:
-
Constructor Details
-
AbstractMessage
Generals constructor for all types of messages.Note: This class is read-only and thus thread-safe
- Parameters:
s
- source of messaged
- destination of messagec
- the content
-
-
Method Details
-
getSource
-
getDestination
-
getContent
public final <C> C getContent()
-