Java Code Examples for org.jivesoftware.smack.SmackException.NotConnectedException#printStackTrace()

The following examples show how to use org.jivesoftware.smack.SmackException.NotConnectedException#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LolChat.java    From League-of-Legends-XMPP-Chat-Library with MIT License 5 votes vote down vote up
/**
 * Disconnects from chatserver and releases all resources.
 */
public void disconnect() {
	connection.getRoster().removeRosterListener(leagueRosterListener);
	try {
		connection.disconnect();
	} catch (final NotConnectedException e) {
		e.printStackTrace();
	}
	stop = true;
}
 
Example 2
Source File: LolChat.java    From League-of-Legends-XMPP-Chat-Library with MIT License 5 votes vote down vote up
private void updateStatus() {
	final CustomPresence newPresence = new CustomPresence(type,
			status.toString(), 1, mode);
	newPresence.setInvisible(invisible);
	try {
		connection.sendPacket(newPresence);
	} catch (final NotConnectedException e) {
		e.printStackTrace();
	}
}
 
Example 3
Source File: Friend.java    From League-of-Legends-XMPP-Chat-Library with MIT License 5 votes vote down vote up
/**
 * Changes the name of this Friend.
 * 
 * @param name
 *            The new name for this Friend
 */
public void setName(String name) {
	try {
		get().setName(name);
	} catch (final NotConnectedException e) {
		e.printStackTrace();
	}
}
 
Example 4
Source File: FriendGroup.java    From League-of-Legends-XMPP-Chat-Library with MIT License 5 votes vote down vote up
/**
 * Changes the name of this group. Case sensitive.
 * 
 * @param name
 *            the new name of this group
 */
public void setName(String name) {
	try {
		get().setName(name);
	} catch (final NotConnectedException e) {
		e.printStackTrace();
	}
}