Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Public Member Functions | |
ConnectionHandler (final XMPPConnectionService connectionService, final TCPServer tcpServer, final MDNSService mDNSService, final IConnectionManager transferManager,@Nullable final IProxyResolver proxyResolver, final Preferences preferences) | |
ConnectionState | getConnectionState () |
Exception | getConnectionError () |
String | getConnectionID () |
boolean | isConnected () |
void | addConnectionStateListener (IConnectionStateListener listener) |
void | removeConnectionStateListener (IConnectionStateListener listener) |
void | connect (final XMPPAccount account, final boolean failSilently) |
void | disconnect () |
void | setCallback (IConnectingFailureCallback callback) |
Facade for handling connection establishment and connection events. This facade should be preferred over XMPPConnectionService and should always be used in UI components and widgets.
de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.ConnectionHandler | ( | final XMPPConnectionService | connectionService, |
final TCPServer | tcpServer, | ||
final MDNSService | mDNSService, | ||
final IConnectionManager | transferManager, | ||
@Nullable final IProxyResolver | proxyResolver, | ||
final Preferences | preferences | ||
) |
void de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.addConnectionStateListener | ( | IConnectionStateListener | listener | ) |
void de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.connect | ( | final XMPPAccount | account, |
final boolean | failSilently | ||
) |
Connects to the a XMPP server with the given account. If a connection establishment (connect or disconnect) is already in progress this connection attempt will be ignored.
If there is already an established connection this connection will be disconnected.
account | the account to connect with |
failSilently | if set to true a connection failure will not be reported to the IConnectingFailureCallback callback} this method may block for several seconds |
void de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.disconnect | ( | ) |
Exception de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.getConnectionError | ( | ) |
Returns the latest connection error.
null
String de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.getConnectionID | ( | ) |
Returns a unique id for the current connection.
null
if no connection is established or the connection has no unique id ConnectionState de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.getConnectionState | ( | ) |
Returns the current connection state.
boolean de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.isConnected | ( | ) |
Checks if a connection is currently established.
true
if a connection is established, false
otherwise void de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.removeConnectionStateListener | ( | IConnectionStateListener | listener | ) |
void de.fu_berlin.inf.dpp.communication.connection.ConnectionHandler.setCallback | ( | IConnectingFailureCallback | callback | ) |