public static enum MatsSocketServer.MessageType extends java.lang.Enum<MatsSocketServer.MessageType>
Enum Constant and Description |
---|
ACK
The specified message was Received, and acknowledged positively - i.e.
|
ACK2
An "Acknowledge ^ 2", i.e.
|
AUTH
From Client: The client can use a separate AUTH message to send over the requested
REAUTH (it could
just as well put the 'auth' in a PING or any other message it had pending). |
HELLO
A HELLO message must be part of the first Pipeline of messages, preferably alone.
|
NACK
The specified message was Received, but it did not acknowledge it - i.e.
|
PING
A PING, to which a
PONG is expected. |
PONG
A Reply to a
PING . |
PUB
Topic message from Server: A message is issued on Topic, the TopicId is specified in 'eid', while the message
is in 'msg'.
|
REAUTH
The server requests that the Client re-authenticates, where the Client should immediately get a fresh
authentication and send it back using either any message it has pending, or in a separate
AUTH
message. |
REJECT
|
REQUEST
|
RESOLVE
|
RETRY
The sender should retry the message (the receiver could not handle it right now, but a Retry might fix it).
|
SEND
The sender sends a "fire and forget" style message.
|
SUB
Request from Client: The Client want to subscribe to a Topic, the TopicId is specified in 'eid'.
|
SUB_LOST
Reply from Server: Subscription went OK, but you've lost messages: The messageId that was referenced in the
SUB was not known to the server, implying that there are at least one message that has
expired, but we don't know whether it was 1 or 1 million - so you won't get any of them "replayed". |
SUB_NO_AUTH
Reply from Server: Subscription was not authorized - no messages for this Topic will be delivered.
|
SUB_OK
Reply from Server: Subscription was OK.
|
UNSUB
Request from Client: The Client want to unsubscribe from a Topic, the TopicId is specified in 'eid'.
|
WELCOME
The reply to a
HELLO , where the MatsSocketSession is established, and the MatsSocketSessionId is
returned. |
Modifier and Type | Method and Description |
---|---|
static MatsSocketServer.MessageType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MatsSocketServer.MessageType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MatsSocketServer.MessageType HELLO
public static final MatsSocketServer.MessageType WELCOME
HELLO
, where the MatsSocketSession is established, and the MatsSocketSessionId is
returned. If you included a MatsSocketSessionId in the HELLO, signifying that you want to reconnect to an
existing session, and you actually get a WELCOME back, it will be the same as what you provided - otherwise
the connection is closed with MatsSocketServer.MatsSocketCloseCodes.SESSION_LOST
.public static final MatsSocketServer.MessageType SEND
public static final MatsSocketServer.MessageType REQUEST
public static final MatsSocketServer.MessageType RETRY
public static final MatsSocketServer.MessageType ACK
public static final MatsSocketServer.MessageType NACK
public static final MatsSocketServer.MessageType ACK2
ACK
or NACK
. When the receiver gets this,
it may safely delete the entry it has for the specified message from its Inbox.
The message is now fully transferred from one side to the other, and both parties again has no reference to
this message in their Inbox and Outbox.public static final MatsSocketServer.MessageType RESOLVE
public static final MatsSocketServer.MessageType REJECT
public static final MatsSocketServer.MessageType SUB
public static final MatsSocketServer.MessageType UNSUB
public static final MatsSocketServer.MessageType SUB_OK
public static final MatsSocketServer.MessageType SUB_LOST
SUB
was not known to the server, implying that there are at least one message that has
expired, but we don't know whether it was 1 or 1 million - so you won't get any of them "replayed".
You must therefore "get up to speed" by other means, e.g. if the subscription in question is some kind of
cache delta-update mechanism, you will now have to reload the entire cache.public static final MatsSocketServer.MessageType SUB_NO_AUTH
public static final MatsSocketServer.MessageType PUB
public static final MatsSocketServer.MessageType REAUTH
AUTH
message. Message processing - both processing of received messages, and sending of outgoing messages (i.e.
Replies to REQUESTs, or Server-initiated SENDs and REQUESTs) will be stalled until such auth is gotten.public static final MatsSocketServer.MessageType AUTH
REAUTH
(it could
just as well put the 'auth' in a PING or any other message it had pending).public static final MatsSocketServer.MessageType PING
PONG
is expected.public static final MatsSocketServer.MessageType PONG
PING
.public static MatsSocketServer.MessageType[] values()
for (MatsSocketServer.MessageType c : MatsSocketServer.MessageType.values()) System.out.println(c);
public static MatsSocketServer.MessageType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null