Package protocols.apps.chat.messages
Class ChatDirectMessage
java.lang.Object
pt.unl.fct.di.novasys.babel.generic.ProtoMessage
protocols.apps.chat.messages.ChatDirectMessage
public class ChatDirectMessage
extends pt.unl.fct.di.novasys.babel.generic.ProtoMessage
A chat message sent directly to one peer (not broadcast). The chat app
sends these over the membership's shared channel via
sendMessage(msg,
targetHost). Two kinds:
ChatDirectMessage.Kind.HELLO— the presence handshake: "hi, I'm <nick>", sent to a peer when we become neighbours so each side learns the other's nickname (aHostalone isn't human-friendly);ChatDirectMessage.Kind.PRIVATE— a private message typed with/msg.
Direct messaging works to any member because membership is full — every participant is a directly-connected neighbour.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final pt.unl.fct.di.novasys.network.ISerializer<ChatDirectMessage> -
Constructor Summary
ConstructorsConstructorDescriptionChatDirectMessage(ChatDirectMessage.Kind kind, String fromNick, String text) -
Method Summary
Methods inherited from class pt.unl.fct.di.novasys.babel.generic.ProtoMessage
getId
-
Field Details
-
MSG_ID
public static final short MSG_ID- See Also:
-
serializer
-
-
Constructor Details
-
ChatDirectMessage
-
-
Method Details
-
getKind
-
getFromNick
-
getText
-