com.zion.jbuddy
Interface IAimClient

All Superinterfaces:
IClient

public interface IAimClient
extends IClient

Provides access to features specific to the AIM protocol.

An IClient can be casted to an IAimClient if the specified protocol is AIM.

// creates an IAimClient IClient client = IClientFactory.factory(gateway, IClient.AIM, username, password); IAimClient aimClient = (IAimClient)client;


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
 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.
 void requestAwayMessage(String username)
          Requests a user's custom away message.
 void sendConfigToServer()
          Saves the buddy list, permit list, deny list, and permit mode to the server.
 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, sendIM, sendMessage, setKeepAliveInterval, setNickName, setPermitMode, setPlainTextMode, setStatus
 

Method Detail

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

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

requestAwayMessage

void requestAwayMessage(String username)
                        throws IOException
Requests a user's custom away message.

AIM users store their custom away messages on the server. If the specified user has set a custom away message, and this client is allowed to view it, it will be received through IGateway.incomingMessage, with a message type of CUSTOM_AWAY.

This method only works for clients connected to AIM via the OSCAR protocol.

Parameters:
username - the name of the user whose away message you wish to request
Throws:
IOException - if there is a problem communicating with the server

sendConfigToServer

void sendConfigToServer()
                        throws IOException
Saves the buddy list, 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 requests buddy presence and applies privacy settings.

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

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.



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