com.zion.jbuddy
Interface IClient

All Known Subinterfaces:
IAimClient, IIcqClient, IJabberClient, IJscClient, ILcsClient, IMsnClient, ISametimeClient, IYimClient

public interface IClient

Allows the user to interact with the IM server. Invokes the methods on IGateway to handle incoming messages and events.

See Also:
IGateway

Field Summary
static int AIM
          The AOL Instant Messenger protocol.
static String CONNECTION_CLOSED_REASON
          The server has closed the client connection for some reason (for example, if the client's account has been suspended or deleted).
static String DISCONNECT_REASON
          The client was disconnected via the disconnect() method.
static String FAILED_LOGIN_REASON
          The login attempt failed for some reason.
static int ICQ
          The ICQ protocol.
static int JABBER
          The Jabber (XMPP) protocol.
static int JSC
          Zion's JBuddy Message Server (JSC) protocol.
static int LCS
          The Microsoft Live Communications Server protocol.
static int MSN
          The MSN Messenger protocol.
static String NETWORK_ERROR_REASON
          The connection was lost as a result of some network error (for example, the socket may have been forcefully closed as a result of a problem with the network, or the server may have closed our socket connection).
static int PLAIN_TEXT
          The plain text mode for receiving Instant Messages in plain text only.
static int RICH_TEXT
          The plain text mode for receiving Instant Messages in their native form.
static int SAMETIME
          The Lotus Instant Messaging (Sametime) protocol.
static String SERVICE_TEMPORARILY_UNAVAILABLE_REASON
          The server has closed the client connection because it is temporarily available or cannot currently accept any more logins.
static String UNKNOWN_REASON
          The connection was lost for an unknown reason.
static String USER_BOOTED_REASON
          The client has signed on at another location, therefore terminating the current connection.
static int YIM
          The Yahoo Messenger protocol.
 
Method Summary
 boolean addBuddy(String name, String nick, String group)
          This method modifies the local buddylist and informs the IM server that one wishes to receive periodic status messages on the online state of a given user.
 boolean addBuddyToList(IBuddy buddy, IBuddyList blist)
          This method modifies the local buddylist and informs the IM server that one wishes to receive periodic status messages on the online state of a given buddy.
 boolean addDeny(String name, String nick, String group)
          This method informs the IM server that one wishes to disallow the given user from receiving periodic status messages on our online state.
 void addFileSessionInvitationListener(IFileSessionInvitationListener listener)
          Adds a file session invitation listener.
 void addGateway(IGateway gateway)
          Registers a gateway to receive incoming messages, presence and other events from this client.
 boolean addPermit(String name, String nick, String group)
          This method informs the IM server that one wishes to allow the given user to receive periodic status messages on our online state.
 boolean connect()
          Initiates the connection and signs on to the IM server.
 boolean connect(String host, int port)
          Initiates the connection and signs on to the IM server at the specified address.
 IFileSession createFileSession(String recipient, File file)
          Creates an outgoing file session.
 void disconnect()
          Disconnects this client from the IM server.
 IBuddyList getBuddyList()
          Returns a reference to this client's Buddy List.
 IConferenceService getConferenceService()
          Returns this client's conference service.
 String getCustomAwayMessage()
          Returns this client's custom away message.
 IBuddyList getDenyList()
          Returns a reference to this client's Deny List.
 Date getIdleTimeStamp()
          Returns the date and time this client went idle (from passing IDLE to setStatus).
 String getName()
          Returns this client's username.
 String getNickName()
          Returns this client's nickname (display name).
 String getPassword()
          Returns this client's password.
 IBuddyList getPermitList()
          Returns a reference to this client's Permit List.
 int getPermitMode()
          Returns this client's permit mode.
 int getPlainTextMode()
          Returns this client's plain text mode for receiving Instant Messages.
 int getProtocol()
          Returns this client's protocol.
 String getProtocolName()
          Returns the name of this client's protocol.
 Date getSignOnTimeStamp()
          Returns the date and time that this client signed on to the IM server.
 int getStatus()
          Returns this client's current online status.
 String getStatusAsString()
          Returns this client's current online status, represented as a printable string (currently in English).
 Date getStatusTimeStamp()
          Returns the date and time of the last status change for this client (from the last call to setStatus).
 boolean isOnline()
          Returns true if this client is connected to the IM server.
 boolean isSecure()
          Returns true if this client is connected to the server, and the connection is secure.
 int numberOfMessagesReceived()
          Returns the number of messages received by this client since it connected to the server.
 int numberOfMessagesSent()
          Returns the number of messages sent by this client since it connected to the server.
 boolean removeBuddy(String name, String group)
          This method informs the IM server that one no longer wishes to receive periodic status messages on the online state of a given user.
 boolean removeBuddyFromList(IBuddy buddy, IBuddyList blist)
          This method modifies the local buddylist and informs the IM server that one no longer wishes to receive periodic status messages on the online state of a given buddy.
 boolean removeDeny(String name, String group)
          This method informs the IM server that one wishes to allow the given user to receive periodic status messages on our online state.
 void removeFileSessionInvitationListener(IFileSessionInvitationListener listener)
          Removes a file session invitation listener.
 void removeGateway(IGateway gateway)
          Stops a gateway from receiving incoming messages and events from this client.
 boolean removePermit(String name, String group)
          This method informs the IM server that one wishes to disallow the given user from receiving periodic status messages on our online state.
 void sendConfigToServer()
          Saves buddy list, permit list, deny list, and permit mode changes to the server.
 boolean sendIM(String name, String message)
          Sends an instant message to a user.
 boolean sendMessage(IMessage message)
          Sends an instant message to a user.
 boolean setKeepAliveInterval(int interval)
          Sets the interval at which keep alive packets are automatically sent by this client.
 boolean setNickName(String nickName)
          Sets this client's nickname (display name).
 boolean setPermitMode(int mode)
          Sets this client's permit mode.
 int setPlainTextMode(int mode)
          Sets this client's plain text mode for receiving Instant Messages.
 void setSecure(boolean isSecure, boolean isRequired)
          Specifies whether a secure connection to the server should be used.
 boolean setStatus(int status, String customMessage)
          Sets this client's availability status.
 

Field Detail

PLAIN_TEXT

static final int PLAIN_TEXT
The plain text mode for receiving Instant Messages in plain text only. Any HTML or ASCII tags are stripped from the message before IGateway.incomingMessage is called.

See Also:
setPlainTextMode(int), Constant Field Values

RICH_TEXT

static final int RICH_TEXT
The plain text mode for receiving Instant Messages in their native form. This may include HTML and ASCII control tags.

See Also:
setPlainTextMode(int), Constant Field Values

AIM

static final int AIM
The AOL Instant Messenger protocol.

See Also:
Constant Field Values

ICQ

static final int ICQ
The ICQ protocol.

See Also:
Constant Field Values

MSN

static final int MSN
The MSN Messenger protocol.

See Also:
Constant Field Values

YIM

static final int YIM
The Yahoo Messenger protocol.

See Also:
Constant Field Values

JABBER

static final int JABBER
The Jabber (XMPP) protocol.

Since:
2.2
See Also:
Constant Field Values

SAMETIME

static final int SAMETIME
The Lotus Instant Messaging (Sametime) protocol.

Since:
2.2
See Also:
Constant Field Values

LCS

static final int LCS
The Microsoft Live Communications Server protocol.

Since:
6.0
See Also:
Constant Field Values

JSC

static final int JSC
Zion's JBuddy Message Server (JSC) protocol.

Since:
2.0
See Also:
Constant Field Values

CONNECTION_CLOSED_REASON

static final String CONNECTION_CLOSED_REASON
The server has closed the client connection for some reason (for example, if the client's account has been suspended or deleted).

Since:
5.1
See Also:
IGateway.connectionLost(com.zion.jbuddy.IClient, java.lang.String), Constant Field Values

DISCONNECT_REASON

static final String DISCONNECT_REASON
The client was disconnected via the disconnect() method.

Since:
6.1
See Also:
IGateway.connectionLost(com.zion.jbuddy.IClient, java.lang.String), Constant Field Values

FAILED_LOGIN_REASON

static final String FAILED_LOGIN_REASON
The login attempt failed for some reason. This can happen if the username is not registered, or the password for the username was incorrect.

Since:
5.1
See Also:
IGateway.connectionLost(com.zion.jbuddy.IClient, java.lang.String), Constant Field Values

NETWORK_ERROR_REASON

static final String NETWORK_ERROR_REASON
The connection was lost as a result of some network error (for example, the socket may have been forcefully closed as a result of a problem with the network, or the server may have closed our socket connection).

Since:
5.1
See Also:
IGateway.connectionLost(com.zion.jbuddy.IClient, java.lang.String), Constant Field Values

SERVICE_TEMPORARILY_UNAVAILABLE_REASON

static final String SERVICE_TEMPORARILY_UNAVAILABLE_REASON
The server has closed the client connection because it is temporarily available or cannot currently accept any more logins. This can happen if the server is going down for maintenance, or is at capacity and cannot serve any more users.

Since:
5.1
See Also:
IGateway.connectionLost(com.zion.jbuddy.IClient, java.lang.String), Constant Field Values

USER_BOOTED_REASON

static final String USER_BOOTED_REASON
The client has signed on at another location, therefore terminating the current connection.

Since:
5.1
See Also:
IGateway.connectionLost(com.zion.jbuddy.IClient, java.lang.String), Constant Field Values

UNKNOWN_REASON

static final String UNKNOWN_REASON
The connection was lost for an unknown reason.

Since:
6.1
See Also:
IGateway.connectionLost(com.zion.jbuddy.IClient, java.lang.String), Constant Field Values
Method Detail

getName

String getName()
Returns this client's username. This name is unique within this client's protocol.


getNickName

String getNickName()
Returns this client's nickname (display name). This name is not guaranteed to be unique within this client's protocol.

Valid for AIM, ICQ, MSN, SAMETIME.

Returns:
this client's nickname, or null if it is not available

setNickName

boolean setNickName(String nickName)
                    throws IOException
Sets this client's nickname (display name).

This is typically set when the client is created through IClientFactory, and is not guaranteed to be unique within this client's protocol. The nickname change may only last for the given session, depending on the protocol.

Valid for AIM, ICQ, MSN.

Throws:
IOException - if there is a problem communicating with the server
Since:
2.2

getPassword

String getPassword()
Returns this client's password.


getProtocolName

String getProtocolName()
Returns the name of this client's protocol.

Returns:
one of the following: JSC, AIM, ICQ, MSN, YIM, JABBER, LCS, SAMETIME

getProtocol

int getProtocol()
Returns this client's protocol.


getBuddyList

IBuddyList getBuddyList()
Returns a reference to this client's Buddy List.

All instant messaging programs utilize the concept of having a list of buddies (or "friends") for which the user can detect online presence. This eases communication with other users. In JBuddy, we call this a "Buddy List".

The Buddy List will be populated by the IClient during the connection process. Therefore, you may add any users stored locally before calling connect().


getPermitList

IBuddyList getPermitList()
Returns a reference to this client's Permit List.

Many instant messaging programs have the ability to allow only a certain set of users to be aware of our online presence and/or send us instant messages. In JBuddy we call this the "Permit List".

The Permit List will be populated by the IClient during the connection process. Therefore, you may add any users stored locally before calling connect().

Valid for AIM, JABBER, JSC, MSN, SAMETIME.


getDenyList

IBuddyList getDenyList()
Returns a reference to this client's Deny List.

Many instant messaging programs have the ability to block a certain set of users from being aware of our online presence and/or sending us instant messages. In JBuddy we call this the "Deny List".

The Deny List will be populated by the IClient during the connection process. Therefore, you may add any users stored locally before calling connect().


setPermitMode

boolean setPermitMode(int mode)
                      throws IOException
Sets this client's permit mode. The permit mode tells the server how to interpret the permit and deny lists.

A denied user (a user denied as a result of the permit mode) can not send messages to the client, or receive presence updates from the client (it will appear as if the client is offline to the user). Depending on the protocol, the client may not be able to send messages to the user, or receive presence updates from the user (it will appear as if the user is offline to the client).


The following are prevented when a user is denied. "Incoming" means from the user to the client. "Outgoing" means from the client to the user. "All" means both incoming and outgoing.

AIM
all messages
all presence
ICQ
all messages
all presence
MSN
incoming messages
outgoing presence
JABBER
incoming messages
all presence
JSC
incoming messages
outgoing presence
SAMETIME
all messages
all presence
YIM
incoming messages
outgoing presence


Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Since JBuddy 2.4, JABBER clients must call sendConfigToServer() for the changes to be saved to the server. This also applies privacy settings.

Returns:
true if the permit mode was valid for this client's protocol
Throws:
IOException - if there was a problem communicating with the server
See Also:
PERMIT_ALL, PERMIT_SOME, DENY_ALL, DENY_SOME, IAimClient.sendConfigToServer(), IIcqClient.sendConfigToServer(), IJabberClient.sendConfigToServer()

getPermitMode

int getPermitMode()
Returns this client's permit mode. The permit mode tells the server how to interpret the permit and deny lists.

See Also:
PERMIT_ALL, PERMIT_SOME, DENY_ALL, DENY_SOME

getConferenceService

IConferenceService getConferenceService()
                                        throws IOException
Returns this client's conference service.

Valid for AIM, ICQ, JABBER, LCS, MSN, SAMETIME, YIM.

Throws:
IOException - if this client does not support conferencing, or some other problem occurred
Since:
5.0, 6.3 (LCS (only OCS 2007))

addGateway

void addGateway(IGateway gateway)
Registers a gateway to receive incoming messages, presence and other events from this client.

Since:
6.0

removeGateway

void removeGateway(IGateway gateway)
Stops a gateway from receiving incoming messages and events from this client.

Since:
6.0

connect

boolean connect()
                throws IOException
Initiates the connection and signs on to the IM server.

You should wait until isOnline() returns true before using this client.

Returns:
true if we successfully connected to the IM server
Throws:
IOException - if there was a problem connecting to the server

connect

boolean connect(String host,
                int port)
                throws IOException
Initiates the connection and signs on to the IM server at the specified address.

You should wait until isOnline() returns true before using this client.

Returns:
true if we successfully connected to the IM server
Throws:
IOException - if there was a problem connecting to the server

disconnect

void disconnect()
Disconnects this client from the IM server.


setKeepAliveInterval

boolean setKeepAliveInterval(int interval)
Sets the interval at which keep alive packets are automatically sent by this client. Keep alives are sent when there is inactivity (in order to keep a connection alive).

Parameters:
interval - the interval, in seconds. If this is a positive value, keep alives will be sent for this client. Otherwise, they will not.
Returns:
true if the operation was successful, false otherwise (if this client's protocol doesn't support keep alives)
Since:
2.4

isOnline

boolean isOnline()
Returns true if this client is connected to the IM server.


numberOfMessagesSent

int numberOfMessagesSent()
Returns the number of messages sent by this client since it connected to the server.


numberOfMessagesReceived

int numberOfMessagesReceived()
Returns the number of messages received by this client since it connected to the server.

See Also:
IGateway.incomingMessage(com.zion.jbuddy.IClient, com.zion.jbuddy.IMessage)

sendIM

boolean sendIM(String name,
               String message)
               throws IOException
Sends an instant message to a user.

If the message is null and this client's status is something other than ONLINE (but not OFFLINE), the custom away message (if it has been set with setStatus()) will be sent as an auto response message to the user. In AIM and ICQ, this turns on an auto response flag for the recipient to see.

Parameters:
name - the unique name for the person you are sending the instant message to
message - the text of the message you wish to send
Throws:
IOException - if there is a problem communicating with the server

sendMessage

boolean sendMessage(IMessage message)
                    throws Exception
Sends an instant message to a user.

Use this method instead of sendIM(name, message) to send messages with special types (including AUTO_RESPONSE, TYPING, etc).

Parameters:
message - the specified message
Throws:
Exception - if there is a problem communicating with the server
Since:
2.0
See Also:
IMessageFactory.factory(int, IClient, String, String), IMessageFactory.factory(int, IClient, String, com.zion.jbuddy.richcontent.RichContent)

getPlainTextMode

int getPlainTextMode()
Returns this client's plain text mode for receiving Instant Messages.

Many protocols allow markup such as HTML or ASCII tags to be included in an Instant Message, to enhance content. Depending on the situation, these tags may not be desirable.

The default mode is PLAIN_TEXT.

See Also:
PLAIN_TEXT, RICH_TEXT

setPlainTextMode

int setPlainTextMode(int mode)
                     throws Exception
Sets this client's plain text mode for receiving Instant Messages.

Many protocols allow markup such as HTML or ASCII tags to be included in an Instant Message, to enhance content. Depending on the situation, these tags may not be desirable.

Returns:
the previous plain text mode
Throws:
Exception - if the specified mode is invalid
See Also:
PLAIN_TEXT, RICH_TEXT

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.

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 (JABBER), 5.0 (JSC), 6.0 (LCS), 6.3 (AIM, ICQ)

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.

Since:
2.4 (JABBER), 5.0 (JSC), 6.0 (LCS), 6.3 (AIM, ICQ)

setStatus

boolean setStatus(int status,
                  String customMessage)
                  throws IOException
Sets this client's availability status.

To go idle (if the protocol supports it), set the status to IDLE. A protocol may support being idle at the same time as another status (for example, AWAY and IDLE at the same time). If this is the case, going idle will not change the client's status to IDLE (the client's current status will be preserved). Otherwise, the client's status will be changed to IDLE. To return from an idle state, set any other status type.

If you set the status to INVISIBLE (and the protocol supports it), the client will appear to users as being OFFLINE.

To go OFFLINE, the preferred method is to call the client's disconnect method, although setting the status to OFFLINE will also disconnect the client.


The various Instant Messaging protocols each have their own ways of specifying that the user has stepped away from their computer or is not available for some reason. This method tries to handle all of the various ways of doing this. For that reason, each of the various APIs may not use both of the parameters to this method, or may use them in different ways:

AIM Clients

ICQ Clients

JABBER Clients

JSC Clients

MSN Clients

SAMETIME Clients

YIM Clients


Parameters:
status - the status type. See IBuddy for available status types.
customMessage - the custom message
Returns:
true if the operation was successful. Passing an invalid status type for the current protocol will cause this method to return false.
Throws:
IOException - if there is a problem communicating with the server
See Also:
IBuddy

getStatus

int getStatus()
Returns this client's current online status.


getStatusAsString

String getStatusAsString()
Returns this client's current online status, represented as a printable string (currently in English).


getStatusTimeStamp

Date getStatusTimeStamp()
Returns the date and time of the last status change for this client (from the last call to setStatus).


getIdleTimeStamp

Date getIdleTimeStamp()
Returns the date and time this client went idle (from passing IDLE to setStatus).

Returns:
the Date, or null (if this client isn't idle)
Since:
2.4

getSignOnTimeStamp

Date getSignOnTimeStamp()
Returns the date and time that this client signed on to the IM server.

Returns:
the date and time, or null if this client is not presently online

getCustomAwayMessage

String getCustomAwayMessage()
Returns this client's custom away message.

Returns:
the custom away message, or null if it has not been set
See Also:
sendIM(String, String)

sendConfigToServer

void sendConfigToServer()
                        throws IOException
Saves buddy list, permit list, deny list, and permit mode changes to the server. This also requests buddy presence and applies privacy settings.

This is convenience method. This can be called on any IClient. Only those client types that implement this method (currently only IAimClient, IIcqClient, and IJabberClient) will actually do any work. Other clients automatically send config changes to the server.

Throws:
IOException - if there is a problem communicating with the server
Since:
6.0

addBuddyToList

boolean addBuddyToList(IBuddy buddy,
                       IBuddyList blist)
                       throws IOException
This method modifies the local buddylist and informs the IM server that one wishes to receive periodic status messages on the online state of a given buddy. Information for this buddy will be stored in the Buddy List.

In some IM protocols the other user may be able to block you from receiving this information.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Since JBuddy 2.4, JABBER clients must call sendConfigToServer() for the changes to be saved to the server. This also applies privacy settings.

Parameters:
buddy - the unique buddy for the person whom you wish to receive periodic status messages on
blist - the list to add buddy to
Returns:
true if the operation was successful, false if the Buddy was already in this list (or another failure)
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

removeBuddyFromList

boolean removeBuddyFromList(IBuddy buddy,
                            IBuddyList blist)
                            throws IOException
This method modifies the local buddylist and informs the IM server that one no longer wishes to receive periodic status messages on the online state of a given buddy.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Since JBuddy 2.4, JABBER clients must call sendConfigToServer() for the changes to be saved to the server. This also applies privacy settings.

Parameters:
buddy - the unique buddy for the person whom you no longer wish to receive periodic status messages on
blist - the list to remove buddy from. If the user is in multiple groups in your Buddy List, you must remove all individually. The IM server will stop sending periodic status updates after the last occurrence of this buddy is removed from the list.
Returns:
true if the operation was successful
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

addBuddy

boolean addBuddy(String name,
                 String nick,
                 String group)
                 throws IOException
This method modifies the local buddylist and informs the IM server that one wishes to receive periodic status messages on the online state of a given user. Information for this buddy will be stored in the Buddy List.

In some IM protocols, the other user may be able to block you from receiving this information.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Parameters:
name - the unique user name for the person whom you wish to receive periodic status messages on
nick - the nickname to reference this user. If null, a default nickname will be chosen.
group - the name of the group in your Buddy List to which you wish to add the user. If the group specified does not exist, it will be created.
Returns:
true if the operation was successful
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

removeBuddy

boolean removeBuddy(String name,
                    String group)
                    throws IOException
This method informs the IM server that one no longer wishes to receive periodic status messages on the online state of a given user.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Parameters:
name - the unique user name for the person whom you no longer wish to receive periodic status messages on
group - the name of the group in your buddy list that this user is currently in. If the user is in multiple groups in your Buddy List, you must remove all individually. The IM server will stop sending periodic status updates after the last occurrence of this buddy (screenname) is removed from the list.
Returns:
true if the operation was successful
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

addPermit

boolean addPermit(String name,
                  String nick,
                  String group)
                  throws IOException
This method informs the IM server that one wishes to allow the given user to receive periodic status messages on our online state.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Since JBuddy 2.4, JABBER clients must call sendConfigToServer() for the changes to be saved to the server. This also applies privacy settings.

Valid for AIM, JABBER, JSC, LCS, MSN, SAMETIME.

Parameters:
name - the unique user name for the person whom you wish to add to your Permit List
nick - the nickname to reference this user
group - the name of the group in your Permit List which you wish to add the user to. If the group specified does not exist, it will be created.
Returns:
true if the operation was successful
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

removePermit

boolean removePermit(String name,
                     String group)
                     throws IOException
This method informs the IM server that one wishes to disallow the given user from receiving periodic status messages on our online state.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Since JBuddy 2.4, JABBER clients must call sendConfigToServer() for the changes to be saved to the server. This also applies privacy settings.

Valid for AIM, JABBER, JSC, LCS, MSN, SAMETIME.

Parameters:
name - the unique user name for the person whom you wish to remove from your Permit List
group - the name of the group in your Permit List that this user is currently in. If the user is in multiple groups in your Permit List, you must remove all individually. The IM server will stop sending periodic status updates after the *first* call to removePermit().
Returns:
true if the operation was successful
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

addDeny

boolean addDeny(String name,
                String nick,
                String group)
                throws IOException
This method informs the IM server that one wishes to disallow the given user from receiving periodic status messages on our online state.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Since JBuddy 2.4, JABBER clients must call sendConfigToServer() for the changes to be saved to the server. This also applies privacy settings.

Parameters:
name - the unique user name for the person whom you wish to add to your Deny List
nick - the nickname to reference this user
group - the name of the group in your Deny List which you wish to add the user to. If the group specified does not exist, it will be created.
Returns:
true if the operation was successful
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

removeDeny

boolean removeDeny(String name,
                   String group)
                   throws IOException
This method informs the IM server that one wishes to allow the given user to receive periodic status messages on our online state.

Since JBuddy 2.0, AIM and ICQ clients must call sendConfigToServer() for the changes to be saved to the server. This also requests buddy presence and applies privacy settings.

Since JBuddy 2.4, JABBER clients must call sendConfigToServer() for the changes to be saved to the server. This also applies privacy settings.

Parameters:
name - the unique user name for the person whom you wish to remove from your Deny List
group - the name of the group in your Deny List that this user is currently in. If the user is in multiple groups in your Deny List, you must remove all individually. The IM server will start sending periodic status updates again after the *first* call to removeDeny().
Returns:
true if the operation was successful
Throws:
IOException - if there was some problem communicating with the IM server
See Also:
sendConfigToServer()

createFileSession

IFileSession createFileSession(String recipient,
                               File file)
                               throws IOException
Creates an outgoing file session.

Returns:
the new file session
Throws:
IOException - if file transfer is not supported by this protocol, the file was not found, or another problem occurred
Since:
2.3, 6.3 LCS (LCS 2005 and OCS 2007)

addFileSessionInvitationListener

void addFileSessionInvitationListener(IFileSessionInvitationListener listener)
Adds a file session invitation listener. The listener will receive file session invitation events from this client.

Since:
2.3, 6.3 LCS (LCS 2005 and OCS 2007)

removeFileSessionInvitationListener

void removeFileSessionInvitationListener(IFileSessionInvitationListener listener)
Removes a file session invitation listener. The listener will no longer receive file session invitation events from this client.

Since:
2.3, 6.3 LCS (LCS 2005 and OCS 2007)


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