Saros
Distributed Collaborative Editing and Distributed Party Programming
|
Static Public Member Functions | |
static void | setDefaultConnectionService (XMPPConnectionService connectionService) |
static String | getNickname (XMPPConnectionService connectionService, JID jid) |
static String | getDisplayableName (RosterEntry entry) |
static Registration | createAccount (String server, String username, String password) throws XMPPException |
static void | removeFromRoster (Connection connection, RosterEntry rosterEntry) throws XMPPException |
static boolean | isJIDonServer (Connection connection, JID jid, String resourceHint) throws XMPPException |
static synchronized Registration | getRegistrationInfo (Connection connection, String toRegister) throws XMPPException |
static String | getUserDirectoryService (Connection connection, String service) |
static String | getMultiUserChatService (Connection connection, String service) |
Utility class for classic XMPP operations
static Registration de.fu_berlin.inf.dpp.net.util.XMPPUtils.createAccount | ( | String | server, |
String | username, | ||
String | password | ||
) | throws XMPPException [static] |
Creates the given account on the given XMPP server.
server | the server on which to create the account |
username | for the new account |
password | for the new account |
null
if the account was registered, otherwise a description is returned which may containing additional information on how to register an account on the given XMPP server or an error codeXMPPException | exception that occurs while registering |
static String de.fu_berlin.inf.dpp.net.util.XMPPUtils.getDisplayableName | ( | RosterEntry | entry | ) | [static] |
static String de.fu_berlin.inf.dpp.net.util.XMPPUtils.getMultiUserChatService | ( | Connection | connection, |
String | service | ||
) | [static] |
Returns the service for multiuser chat.
connection | the current XMPP connection |
service | a service, normally the domain of a XMPP server |
null
if it could not be determined static String de.fu_berlin.inf.dpp.net.util.XMPPUtils.getNickname | ( | XMPPConnectionService | connectionService, |
JID | jid | ||
) | [static] |
connectionService | network component that should be used to resolve the nickname or null to use the default one |
jid | the JID to resolve the nickname for |
static synchronized Registration de.fu_berlin.inf.dpp.net.util.XMPPUtils.getRegistrationInfo | ( | Connection | connection, |
String | toRegister | ||
) | throws XMPPException [static] |
Retrieve XMPP Registration information from a server.
This implementation reuses code from Smack but also sets the from element of the IQ-Packet so that the server could reply with information that the account already exists as given by XEP-0077.
To see what additional information can be queried from the registration object, refer to the XEP directly:
static String de.fu_berlin.inf.dpp.net.util.XMPPUtils.getUserDirectoryService | ( | Connection | connection, |
String | service | ||
) | [static] |
Returns the service for a user directory. The user directory can be used to perform search queries.
connection | the current XMPP connection |
service | a service, normally the domain of a XMPP server |
null
if it could not be determinedstatic boolean de.fu_berlin.inf.dpp.net.util.XMPPUtils.isJIDonServer | ( | Connection | connection, |
JID | jid, | ||
String | resourceHint | ||
) | throws XMPPException [static] |
Returns whether the given JID can be found on the server.
connection |
XMPPException | if the service discovery failed |
static void de.fu_berlin.inf.dpp.net.util.XMPPUtils.removeFromRoster | ( | Connection | connection, |
RosterEntry | rosterEntry | ||
) | throws XMPPException [static] |
Removes given contact from the Roster.
rosterEntry | the contact that is to be removed |
XMPPException | is thrown if no connection is established. |
static void de.fu_berlin.inf.dpp.net.util.XMPPUtils.setDefaultConnectionService | ( | XMPPConnectionService | connectionService | ) | [static] |
Sets the default connection service that should be used when no connection is used for various utility methods offered by this class.
connectionService |