public interface ConnectionListener
Implement this interface to process connection events.
Supply an instance when you call
EFTL.connect(String, java.util.Properties, ConnectionListener).
| Modifier and Type | Field and Description |
|---|---|
static int |
BAD_DATA
Invalid message from server.
|
static int |
BAD_PAYLOAD
Invalid network data.
|
static int |
BAD_SUBSCRIPTION_ID
Bad subscription identifier.
|
static int |
CONNECTION_ERROR
Connection error.
|
static int |
FAILED_TLS_HANDSHAKE
The client could not establish a secure connection to the eFTL server.
|
static int |
FORCE_CLOSE
Force close.
|
static int |
MESSAGE_TOO_LARGE
Message too large.
|
static int |
NORMAL
Normal close.
|
static int |
NOT_AUTHENTICATED
Not authenticated.
|
static int |
POLICY_VIOLATION
Policy violation.
|
static int |
PROTOCOL
Protocol error.
|
static int |
PUBLISH_DISALLOWED
This user is not allowed to publish messages.
|
static int |
SERVER_ERROR
eFTL server error.
|
static int |
SHUTDOWN
The server closed the connection because the server is exiting.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onConnect(Connection connection)
A new connection to the eFTL server is ready to use.
|
void |
onDisconnect(Connection connection,
int code,
java.lang.String reason)
A connection to the eFTL server has closed.
|
void |
onError(Connection connection,
int code,
java.lang.String reason)
An error prevented an operation.
|
void |
onReconnect(Connection connection)
A connection to the eFTL server has re-opened and is ready to use.
|
static final int NORMAL
Your program closed the connection by calling
Connection.disconnect().
Programs can continue clean-up procedures.
static final int SHUTDOWN
static final int PROTOCOL
static final int BAD_DATA
static final int CONNECTION_ERROR
Programs may attempt to reconnect.
static final int BAD_PAYLOAD
static final int POLICY_VIOLATION
static final int MESSAGE_TOO_LARGE
The eFTL server closed the connection because the program sent a message that exceeds the channel's maximum message size. (Administrators can configure this limit.)
Programs may attempt to reconnect.
static final int SERVER_ERROR
static final int FAILED_TLS_HANDSHAKE
Possible diagnoses:
static final int FORCE_CLOSE
The eFTL server closed the connection because another client with the same client identifier has connected.
static final int NOT_AUTHENTICATED
The eFTL server could not authenticate the client's username and passsword.
static final int BAD_SUBSCRIPTION_ID
The server detected an invalid subscription identifier. Please report this error to TIBCO support staff.
static final int PUBLISH_DISALLOWED
Administrators configure permission to publish.
void onConnect(Connection connection)
The eFTL library invokes this method only after your program calls
EFTL.connect(java.lang.String, java.util.Properties, com.tibco.eftl.ConnectionListener) (and not after Connection.reconnect(java.util.Properties)).
connection - This connection is ready to use.void onReconnect(Connection connection)
The eFTL library invokes this method only after your program calls
Connection.reconnect(java.util.Properties) (and not after EFTL.connect(java.lang.String, java.util.Properties, com.tibco.eftl.ConnectionListener)).
connection - This connection is ready to use.void onDisconnect(Connection connection, int code, java.lang.String reason)
Possible codes include:
connection - This connection has closed.code - This code categorizes the condition.
Application programs may use this value
in response logic.reason - This string provides more detail.
Application programs may use this value
in error reporting and logging.void onError(Connection connection, int code, java.lang.String reason)
Your implementation could alert the user.
Possible codes include:
connection - This connection reported an error.code - This code categorizes the error.
Application programs may use this value
in response logic.reason - This string provides more detail.
Application programs may use this value
in error reporting and logging.