public final class ConnectionMessage extends AbstractEBusMessage implements Serializable
remote connection has either
logged on or logged off. If the remote
connection logged off, then may provide the
reason why remote eBus logged off
(reason field may be null).
All connection messages have the subject
"/eBus". Subscribe to
ConnectionMessage.class/eBus to receive
this notification.
Note: this notification is published locally only and is not sent to remote eBus applications.
ServerMessage,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
ConnectionMessage.Builder
Use this builder to create
ConnectionMessage
instances. |
static class |
ConnectionMessage.ConnectionState
A remote eBus is either logged on or logged off.
|
EMessage.MessageType| Modifier and Type | Field and Description |
|---|---|
static EMessageKey |
MESSAGE_KEY
The connection message key
ConnectionMessage.class:/eBus. |
String |
reason
If
state is ConnectionMessage.ConnectionState.LOGGED_OFF
and the log off was due to an exception, then the
exception message is stored
here. |
ConnectionMessage.ConnectionState |
state
The remote eBus is either logged on or logged off.
|
EBUS_SUBJECT, remoteAddress, serverPortMAX_FIELDS| Constructor and Description |
|---|
ConnectionMessage(InetSocketAddress addr,
int serverPort,
ConnectionMessage.ConnectionState state)
Deprecated.
use
ConnectionMessage.Builder to create connection
message. |
ConnectionMessage(InetSocketAddress addr,
int serverPort,
ConnectionMessage.ConnectionState state,
String reason)
Deprecated.
use
ConnectionMessage.Builder to create connection
message. |
ConnectionMessage(String subject,
long timestamp,
InetSocketAddress addr,
int serverPort,
ConnectionMessage.ConnectionState state,
String reason)
Deprecated.
use
ConnectionMessage.Builder to create connection
message. |
| Modifier and Type | Method and Description |
|---|---|
static ConnectionMessage.Builder |
builder()
Returns a connection message builder instance.
|
String |
toString()
Returns the connection message as text.
|
equals, hashCode, isApplicationMessage, isSystemMessage, key, messageTypepublic static final EMessageKey MESSAGE_KEY
ConnectionMessage.class:/eBus. Use this key when
ESubscribeFeed.open(ESubscriber, EMessageKey, EFeed.FeedScope, ECondition)
for this message.public final ConnectionMessage.ConnectionState state
public final String reason
state is ConnectionMessage.ConnectionState.LOGGED_OFF
and the log off was due to an exception, then the
exception message is stored
here. May be null.@Deprecated public ConnectionMessage(InetSocketAddress addr, int serverPort, ConnectionMessage.ConnectionState state)
ConnectionMessage.Builder to create connection
message.reason is set to
null.addr - remote eBus address.serverPort - connection is associated with this
EServer port; zero if not an accepted connection.state - connection state.NullPointerException - if either addr or state is null.@Deprecated public ConnectionMessage(InetSocketAddress addr, int serverPort, ConnectionMessage.ConnectionState state, String reason)
ConnectionMessage.Builder to create connection
message.addr - remote eBus address.serverPort - connection is associated with this
EServer port; zero if not an accepted connection.state - connection state.reason - reason for a logged off state. May be
null or empty.NullPointerException - if either addr or state is null.@Deprecated public ConnectionMessage(String subject, long timestamp, InetSocketAddress addr, int serverPort, ConnectionMessage.ConnectionState state, String reason)
ConnectionMessage.Builder to create connection
message.subject - the notification subject. Will always be
"/eBus".timestamp - notification timestamp.addr - remote eBus address.serverPort - connection is associated with this
EServer port; zero if not an accepted connection.state - connection state.reason - the reason for a
ConnectionMessage.ConnectionState.LOGGED_OFF connection state.NullPointerException - if either addr or state is null.public String toString()
toString in class AbstractEBusMessagepublic static ConnectionMessage.Builder builder()
Copyright © 2019. All rights reserved.