com.zion.jbuddy
Interface IJscClient

All Superinterfaces:
IClient

public interface IJscClient
extends IClient

Provides access to features specific to the JSC protocol.

An IClient can be casted to an IJscClient if the specified protocol is JSC.

// creates an IJscClient IClient client = IClientFactory.factory(gateway, IClient.JSC, username, password); IJscClient jscClient = (IJscClient)client;

Since:
2.0

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
 IBuddyList getReverseList()
          Returns a reference to this client's Reverse List.
 int getWarningPercent()
          Returns this client's warning percentage.
 boolean isSecure()
          Returns true if this client is connected to the server, and the connection is secure.
 IBuddy[] resolveBuddies(String partialName)
          If JBuddy Server is authenticating through an LDAP or Active Directory, this method attempts to resolve the name against Users in the directory using an LDAP search utilizing one or two words.
 void setSecure(boolean isSecure, boolean isRequired)
          Specifies whether a secure connection to the server should be used.
 void warnUser(String username, boolean isAnonymous)
          Issues a warning to another user.
 
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, sendConfigToServer, sendIM, sendMessage, setKeepAliveInterval, setNickName, setPermitMode, setPlainTextMode, setStatus
 

Method Detail

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:
5.0

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:
5.0

warnUser

void warnUser(String username,
              boolean isAnonymous)
              throws IOException
Issues a warning to another user.

This can temporarily and negatively affect the ability of the user to to send messages, by raising their warning percentage. You can only warn users who have recently sent you messages.

Parameters:
username - the name of the user you wish to warn
isAnonymous - whether this is an anonymous warning. Anonymous warnings are less severe.
Throws:
IOException - if there is a problem communicating with the server

getWarningPercent

int getWarningPercent()
Returns this client's warning percentage.


getReverseList

IBuddyList getReverseList()
Returns a reference to this client's Reverse List.

The list contains the users who have registered interest in our online state. It is populated by the server during the connection process. After connecting, users that add us to their Buddy Lists are added to this list; users who remove us from their Buddy Lists are removed from it.


resolveBuddies

IBuddy[] resolveBuddies(String partialName)
                        throws IOException
If JBuddy Server is authenticating through an LDAP or Active Directory, this method attempts to resolve the name against Users in the directory using an LDAP search utilizing one or two words. If two words, separated by a space are given as the partialName, the following ldap search clause is used: "(&(givenName=firstword)(sn=secondword))". If only one word is given, the following ldap search clause is used: "(|(givenName=search)(sn=search))". Wildcard searches are permitted by adding an asterisk to the search in appropriate locations such as at the beginning or ending of a word or in place of a second word. For example, a search of 'Bill* Smith' would return users with the name 'Billy Smith', 'Bill Smith', etc. Another example would be using a wildcard for a last name 'Bill *'. This would return all users with first name of Bill and any last name. 'Bill* *' would also return a user with a first name 'Billy'. If JBuddy Server is authenticating through local users, it will attempt to resolve against accounts within the JBuddy Server Account database table using a SQL where clause "nick_name like 'partialName%'".

Use this method to retrieve information about users (like their username or nickname).

Parameters:
partialName - if part of a user's name (like their first or last name)
Returns:
the resolved buddies, or an empty array if there are no matches
Throws:
IOException - if there is a problem communicating with the directory service
Since:
6.3.120227 (JSC Protocol Version 7.1)


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