Project Wonder 5.0

er.imadaptor
Interface IInstantMessenger

All Known Implementing Classes:
AbstractInstantMessenger, AimBotInstantMessenger, DaimInstantMessenger, JOscarInstantMessenger

public interface IInstantMessenger

IInstantMessenger defines the interface for an instant messenger implementation to hook into the ERIMAdaptor framework.

Author:
mschrag

Method Summary
 void addBuddy(java.lang.String buddyName)
          Adds a buddy to the buddy list.
 void addMessageListener(IMessageListener messageListener)
          Adds a listener to this InstantMessenger.
 long buddyListLastModified()
          Returns the timestamp of the last buddy list modification.
 void connect()
          Connects to the instant messenger service.
 void disconnect()
          Disconnects from the instant messenger service.
 java.lang.String getAwayMessage(java.lang.String buddyName)
          Returns the away message for the given buddy
 java.lang.String[] getBuddiesInGroupNamed(java.lang.String groupName)
          Returns the names of the buddies in the given group.
 java.lang.String[] getGroupNames()
          Returns the names of the buddy list groups.
 java.lang.String getScreenName()
          Returns the screen name of the current user.
 java.lang.String getStatusMessage(java.lang.String buddyName)
          Returns the status message for the given buddy
 boolean isBuddyAway(java.lang.String buddyName)
          Returns whether or not the given buddy is away.
 boolean isBuddyOnline(java.lang.String buddyName)
          Returns whether or not the specified buddy name is online.
 boolean isConnected()
          Returns whether or not this messenger is connected.
 void removeBuddy(java.lang.String buddyName)
          Removes a buddy from the buddy list.
 void removeMessageListener(IMessageListener messageListener)
          Removes a listener from this InstantMessenger.
 void sendMessage(java.lang.String buddyName, java.lang.String message, boolean ignoreIfOffline)
          Sends a message to the specified buddy.
 

Method Detail

buddyListLastModified

long buddyListLastModified()
Returns the timestamp of the last buddy list modification.

Returns:
the timestamp of the last buddy list modification

getScreenName

java.lang.String getScreenName()
Returns the screen name of the current user.


isConnected

boolean isConnected()
Returns whether or not this messenger is connected.


connect

void connect()
             throws IMConnectionException
Connects to the instant messenger service.

Throws:
IMConnectionException - if the connect request fails

disconnect

void disconnect()
Disconnects from the instant messenger service.


isBuddyOnline

boolean isBuddyOnline(java.lang.String buddyName)
                      throws InstantMessengerException
Returns whether or not the specified buddy name is online.

Parameters:
buddyName - the name of the buddy to check for
Throws:
InstantMessengerException

isBuddyAway

boolean isBuddyAway(java.lang.String buddyName)
                    throws InstantMessengerException
Returns whether or not the given buddy is away.

Parameters:
buddyName - the name of the buddy to check
Returns:
whether or not the given buddy is away
Throws:
InstantMessengerException

getStatusMessage

java.lang.String getStatusMessage(java.lang.String buddyName)
                                  throws InstantMessengerException
Returns the status message for the given buddy

Parameters:
buddyName - the name of the buddy to return status for
Returns:
the status of the given buddy
Throws:
InstantMessengerException

getAwayMessage

java.lang.String getAwayMessage(java.lang.String buddyName)
                                throws InstantMessengerException
Returns the away message for the given buddy

Parameters:
buddyName - the name of the buddy to return the away message for
Returns:
the away message of the given buddy
Throws:
InstantMessengerException

addBuddy

void addBuddy(java.lang.String buddyName)
              throws InstantMessengerException
Adds a buddy to the buddy list.

Parameters:
buddyName - the name of the buddy to add
Throws:
InstantMessengerException

removeBuddy

void removeBuddy(java.lang.String buddyName)
                 throws InstantMessengerException
Removes a buddy from the buddy list.

Parameters:
buddyName - the name of the buddy to remove
Throws:
InstantMessengerException

getGroupNames

java.lang.String[] getGroupNames()
                                 throws InstantMessengerException
Returns the names of the buddy list groups.

Returns:
the names of the buddy list groups
Throws:
InstantMessengerException

getBuddiesInGroupNamed

java.lang.String[] getBuddiesInGroupNamed(java.lang.String groupName)
                                          throws InstantMessengerException
Returns the names of the buddies in the given group.

Parameters:
groupName - the name of the group to list
Returns:
the names of the buddies in the given group
Throws:
InstantMessengerException

sendMessage

void sendMessage(java.lang.String buddyName,
                 java.lang.String message,
                 boolean ignoreIfOffline)
                 throws MessageException
Sends a message to the specified buddy.

Parameters:
buddyName - the name of the buddy to message
message - the message to send
ignoreIfOffline - should the message be ignored if the user is offline (false = throw an exception)
Throws:
MessageException

addMessageListener

void addMessageListener(IMessageListener messageListener)
Adds a listener to this InstantMessenger.

Parameters:
messageListener - the message listener to add

removeMessageListener

void removeMessageListener(IMessageListener messageListener)
Removes a listener from this InstantMessenger.

Parameters:
messageListener - the message listener to remove

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.