Package de.neo.rankbridge.shared.message
Class BridgeMessage<T>
java.lang.Object
de.neo.rankbridge.shared.message.BridgeMessage<T>
public class BridgeMessage<T>
extends java.lang.Object
A message between the services.
- Version:
- 1.0
- Author:
- Neo8
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBridgeMessage.ConversationMemberTypes of members of a conversation. -
Field Summary
Fields Modifier and Type Field Description private Tcontentprivate BridgeMessage.ConversationMember[]receiverprivate BridgeMessage.ConversationMembersenderprivate UniversalType<T>universal -
Constructor Summary
Constructors Constructor Description BridgeMessage(BridgeMessage.ConversationMember sender)New BridgeMessage to all services.BridgeMessage(BridgeMessage.ConversationMember sender, BridgeMessage.ConversationMember receiver)New BridgeMessage to one receiver.BridgeMessage(BridgeMessage.ConversationMember sender, BridgeMessage.ConversationMember[] receiver)New BridgeMessage to more receiver. -
Method Summary
Modifier and Type Method Description TgetContent()Gets the content of the message.UniversalType<T>getContentUniversal()Gets the content of the message as UniversalType.BridgeMessage.ConversationMember[]getReceiver()Gets the receiver of the message.BridgeMessage.ConversationMembergetSender()Gets the sender of the message.voidsetContent(T content)Sets the content of the message.voidsetContentUniversal(UniversalType<?> universal)Sets the content of the message.
-
Field Details
-
Constructor Details
-
BridgeMessage
New BridgeMessage to all services.- Parameters:
sender- Sender of the message.
-
BridgeMessage
public BridgeMessage(BridgeMessage.ConversationMember sender, BridgeMessage.ConversationMember receiver)New BridgeMessage to one receiver.- Parameters:
sender- Sender of the message.receiver- Receiver of the message.
-
BridgeMessage
public BridgeMessage(BridgeMessage.ConversationMember sender, BridgeMessage.ConversationMember[] receiver)New BridgeMessage to more receiver.- Parameters:
sender- Sender of the message.receiver- Receivers of the message.
-
-
Method Details
-
getSender
Gets the sender of the message.- Returns:
- the sender of the message.
-
getReceiver
Gets the receiver of the message.- Returns:
- the receiver of the message.
-
setContent
Sets the content of the message.- Parameters:
content- The new content.
-
setContentUniversal
Sets the content of the message.- Parameters:
universal- The new content of the message as UniversalType.
-
getContent
Gets the content of the message.- Returns:
- the original content.
-
getContentUniversal
Gets the content of the message as UniversalType.- Returns:
- the UniversalType content.
-