Project Wonder 5.0

er.imadaptor
Class JOscarInstantMessenger

java.lang.Object
  extended by er.imadaptor.AbstractInstantMessenger
      extended by er.imadaptor.JOscarInstantMessenger
All Implemented Interfaces:
IInstantMessenger

public class JOscarInstantMessenger
extends AbstractInstantMessenger


Nested Class Summary
protected  class JOscarInstantMessenger.AimStateHandler
           
protected  class JOscarInstantMessenger.BuddyChangeListener
           
protected  class JOscarInstantMessenger.ConversationHandler
           
static class JOscarInstantMessenger.Factory
           
protected  class JOscarInstantMessenger.IcbmHandler
           
 
Constructor Summary
JOscarInstantMessenger(java.lang.String screenName, java.lang.String password)
           
 
Method Summary
 net.kano.joustsim.oscar.BuddyInfo _addBuddyIfNecessary(java.lang.String buddyName)
           
 void addBuddy(java.lang.String buddyName)
          Adds a buddy to the buddy list.
 long buddyListLastModified()
          Returns the timestamp of the last buddy list modification.
protected  void buddyListModified()
           
 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 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 sendMessage(java.lang.String buddyName, java.lang.String message, boolean ignoreIfOffline)
          Sends a message to the specified buddy.
 
Methods inherited from class er.imadaptor.AbstractInstantMessenger
addMessageListener, fireMessageReceived, getPassword, getScreenName, removeMessageListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOscarInstantMessenger

public JOscarInstantMessenger(java.lang.String screenName,
                              java.lang.String password)
Method Detail

buddyListLastModified

public long buddyListLastModified()
Description copied from interface: IInstantMessenger
Returns the timestamp of the last buddy list modification.

Returns:
the timestamp of the last buddy list modification

buddyListModified

protected void buddyListModified()

isBuddyOnline

public boolean isBuddyOnline(java.lang.String buddyName)
Description copied from interface: IInstantMessenger
Returns whether or not the specified buddy name is online.

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

isBuddyAway

public boolean isBuddyAway(java.lang.String buddyName)
Description copied from interface: IInstantMessenger
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

getStatusMessage

public java.lang.String getStatusMessage(java.lang.String buddyName)
Description copied from interface: IInstantMessenger
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

getAwayMessage

public java.lang.String getAwayMessage(java.lang.String buddyName)
Description copied from interface: IInstantMessenger
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

getGroupNames

public java.lang.String[] getGroupNames()
Description copied from interface: IInstantMessenger
Returns the names of the buddy list groups.

Returns:
the names of the buddy list groups

getBuddiesInGroupNamed

public java.lang.String[] getBuddiesInGroupNamed(java.lang.String groupName)
Description copied from interface: IInstantMessenger
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

removeBuddy

public void removeBuddy(java.lang.String buddyName)
Description copied from interface: IInstantMessenger
Removes a buddy from the buddy list.

Parameters:
buddyName - the name of the buddy to remove

addBuddy

public void addBuddy(java.lang.String buddyName)
Description copied from interface: IInstantMessenger
Adds a buddy to the buddy list.

Parameters:
buddyName - the name of the buddy to add

_addBuddyIfNecessary

public net.kano.joustsim.oscar.BuddyInfo _addBuddyIfNecessary(java.lang.String buddyName)

connect

public void connect()
             throws IMConnectionException
Description copied from interface: IInstantMessenger
Connects to the instant messenger service.

Throws:
IMConnectionException - if the connect request fails

disconnect

public void disconnect()
Description copied from interface: IInstantMessenger
Disconnects from the instant messenger service.


isConnected

public boolean isConnected()
Description copied from interface: IInstantMessenger
Returns whether or not this messenger is connected.


sendMessage

public void sendMessage(java.lang.String buddyName,
                        java.lang.String message,
                        boolean ignoreIfOffline)
                 throws MessageException
Description copied from interface: IInstantMessenger
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

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

Copyright © 2002 – 2007 Project Wonder.