public interface ConnectionListener
Connection
.Connection
Modifier and Type | Method and Description |
---|---|
void |
onConnected(Connection inConnection)
Called after the
Connection has successfully connected to your Twilio application. |
void |
onConnecting(Connection inConnection)
Called for a newly-created
Connection when it is connecting to your Twilio application. |
void |
onDisconnected(Connection inConnection)
Called after the
Connection has been disconnected, ignored, or rejected by either party. |
void |
onDisconnected(Connection inConnection,
int inErrorCode,
java.lang.String inErrorMessage)
Called when an error occurs on the specified connection.
|
void onConnecting(Connection inConnection)
Connection
when it is connecting to your Twilio application.
When this occurs, Connection
is in the Connection.State.CONNECTING
state.inConnection
- The Connection that has started connectingvoid onConnected(Connection inConnection)
Connection
has successfully connected to your Twilio application.
Note that this does not necessarily mean your application has
executed successfully; it only indicates that the connection has been
established.
When this occurs the Connection
will be in the Connection.State.CONNECTED
state.inConnection
- The Connection that has finished connectingvoid onDisconnected(Connection inConnection)
Connection
has been disconnected, ignored, or rejected by either party.
When this occurs the Connection
will be in the
Connection.State.DISCONNECTED
state.inConnection
- The Connection that has disconnectedvoid onDisconnected(Connection inConnection, int inErrorCode, java.lang.String inErrorMessage)
Connection
will be in the
Connection.State.DISCONNECTED
state.
For a list of error codes and their meanings, see
http://www.twilio.com/docs/client/errors.inConnection
- The Connection that has experienced an errorinErrorCode
- The error code that pinpoints the errorinErrorMessage
- A string describing the error in a human-readable form