com.zion.jbuddy
Interface IJabberClient

All Superinterfaces:
IClient

public interface IJabberClient
extends IClient

Provides access to features specific to the JABBER protocol.

An IClient can be casted to an IJabberClient if the specified protocol is JABBER.

// creates an IJabberClient IClient client = IClientFactory.factory(gateway, IClient.JABBER, username, password); IJabberClient jabberClient = (IJabberClient)client;

Since:
2.2

Field Summary
 
Fields inherited from interface com.zion.jbuddy.IClient
AIM, CONNECTION_CLOSED_REASON, DISCONNECT_REASON, FAILED_LOGIN_REASON, ICQ, JABBER, JSC, LCS, MSN, NETWORK_ERROR_REASON, PLAIN_TEXT, RICH_TEXT, SAMETIME, SERVICE_TEMPORARILY_UNAVAILABLE_REASON, UNKNOWN_REASON, USER_BOOTED_REASON, YIM
 
Method Summary
 String getResourceName()
          Returns this client's resource name.
 boolean isSecure()
          Returns true if this client is connected to the server, and the connection is secure.
 boolean isUseXMPP()
          Returns true if this client should use the XMPP protocol.
 void sendConfigToServer()
          Saves the permit list, deny list, and permit mode to the server.
 boolean setResourceName(String name)
          Sets the name of this client's resource.
 void setSecure(boolean isSecure, boolean isRequired)
          Specifies whether a secure connection to the server should be used.
 boolean setUseXMPP(boolean b)
          Specifies whether this client should use the XMPP protocol.
 
Methods inherited from interface com.zion.jbuddy.IClient
addBuddy, addBuddyToList, addDeny, addFileSessionInvitationListener, addGateway, addPermit, connect, connect, createFileSession, disconnect, getBuddyList, getConferenceService, getCustomAwayMessage, getDenyList, getIdleTimeStamp, getName, getNickName, getPassword, getPermitList, getPermitMode, getPlainTextMode, getProtocol, getProtocolName, getSignOnTimeStamp, getStatus, getStatusAsString, getStatusTimeStamp, isOnline, numberOfMessagesReceived, numberOfMessagesSent, removeBuddy, removeBuddyFromList, removeDeny, removeFileSessionInvitationListener, removeGateway, removePermit, sendIM, sendMessage, setKeepAliveInterval, setNickName, setPermitMode, setPlainTextMode, setStatus
 

Method Detail

getResourceName

String getResourceName()
Returns this client's resource name.

Since:
2.4

setResourceName

boolean setResourceName(String name)
Sets the name of this client's resource. Clients can sign on multiple times using different resources, or locations.

The resource name can only be set or changed before connect() is called.

Parameters:
name - the name of this client's resource. If null, or an empty string, the default name "JBuddy" will be used.
Returns:
true if the resource name was successfully changed
Since:
2.4

setSecure

void setSecure(boolean isSecure,
               boolean isRequired)
Specifies whether a secure connection to the server should be used.

Valid for AIM, ICQ, JABBER, JSC, LCS.

This method will do nothing if it is called on a client that doesn't support TLS connections.

Specified by:
setSecure in interface IClient
Parameters:
isSecure - whether a secure connection to the server should be used. If this is true, when connecting, a TLS connection will be opened with the server.
isRequired - whether a secure connection to the server is required. If isSecure and isRequired are both true, connect() will only succeed if a secure connection was successfully established.
Since:
2.4

isSecure

boolean isSecure()
Returns true if this client is connected to the server, and the connection is secure.

Valid for AIM, ICQ, JABBER, JSC, LCS.

Specified by:
isSecure in interface IClient
Since:
2.4

setUseXMPP

boolean setUseXMPP(boolean b)
Specifies whether this client should use the XMPP protocol.

Returns:
the previous value
Since:
2.4

isUseXMPP

boolean isUseXMPP()
Returns true if this client should use the XMPP protocol.

Since:
2.4

sendConfigToServer

void sendConfigToServer()
                        throws IOException
Saves the permit list, deny list, and permit mode to the server.

This method must be called for changes to any of these items to go into effect. This applies privacy settings.

Specified by:
sendConfigToServer in interface IClient
Throws:
IOException - if there is a problem communicating with the server
Since:
2.4


JBuddy is a trademark of Zion Software, LLC in the US and other countries.
Copyright 2000-2012 Zion Software, LLC All Rights Reserved.