JML

net.sf.jml.impl
Class AbstractSwitchboard

java.lang.Object
  extended by net.sf.jml.impl.AbstractSwitchboard
All Implemented Interfaces:
MsnSwitchboard
Direct Known Subclasses:
BasicSwitchboard

public abstract class AbstractSwitchboard
extends Object
implements MsnSwitchboard

Implement MsnSwitchboard basic method.

Author:
Roger Chen

Constructor Summary
AbstractSwitchboard(MsnMessenger messenger)
           
 
Method Summary
 void addContact(MsnContact contact)
           
 void addFileTransfer(MsnFileTransfer transfer)
           
 boolean containContact(Email email)
          Is contain the contact.
 boolean containContact(MsnContact contact)
           
 MsnFileTransfer[] getActiveFileTransfers()
          Get all active file transfer.
 MsnContact[] getAllContacts()
          Get all contacts on the switchboard.
 Object getAttachment()
          Get the attachment.
 MsnMessenger getMessenger()
          Get the MsnMessenger belongs to.
 void removeContact(MsnContact contact)
           
 void removeFileTransfer(MsnFileTransfer transfer)
           
 void send(MsnOutgoingMessage message)
          This method is a shorthand for:
 void sendMessage(MsnMimeMessage message)
          This method is a shorthand for:
 void setAttachment(Object attachment)
          Set the attachment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jml.MsnSwitchboard
close, getConnection, getIncomingMessageChain, getOutgoingMessageChain, inviteContact, send, sendFile, sendMessage, sendText
 

Constructor Detail

AbstractSwitchboard

public AbstractSwitchboard(MsnMessenger messenger)
Method Detail

getMessenger

public MsnMessenger getMessenger()
Description copied from interface: MsnSwitchboard
Get the MsnMessenger belongs to.

Specified by:
getMessenger in interface MsnSwitchboard
Returns:
MsnMessenger

getAttachment

public Object getAttachment()
Description copied from interface: MsnSwitchboard
Get the attachment.

Specified by:
getAttachment in interface MsnSwitchboard
Returns:
attachment

setAttachment

public void setAttachment(Object attachment)
Description copied from interface: MsnSwitchboard
Set the attachment.

Specified by:
setAttachment in interface MsnSwitchboard
Parameters:
attachment - attachment

getAllContacts

public MsnContact[] getAllContacts()
Description copied from interface: MsnSwitchboard
Get all contacts on the switchboard.

Specified by:
getAllContacts in interface MsnSwitchboard
Returns:
all contacts on the switchboard.

addContact

public void addContact(MsnContact contact)

removeContact

public void removeContact(MsnContact contact)

containContact

public boolean containContact(MsnContact contact)

containContact

public boolean containContact(Email email)
Description copied from interface: MsnSwitchboard
Is contain the contact.

Specified by:
containContact in interface MsnSwitchboard
Parameters:
email - email
Returns:
is contain the contact

getActiveFileTransfers

public MsnFileTransfer[] getActiveFileTransfers()
Description copied from interface: MsnSwitchboard
Get all active file transfer.

Specified by:
getActiveFileTransfers in interface MsnSwitchboard
Returns:
all file transfer

addFileTransfer

public void addFileTransfer(MsnFileTransfer transfer)

removeFileTransfer

public void removeFileTransfer(MsnFileTransfer transfer)

send

public void send(MsnOutgoingMessage message)
Description copied from interface: MsnSwitchboard
This method is a shorthand for:
     send(message, false);
 

Specified by:
send in interface MsnSwitchboard
Parameters:
message - MsnOutgoingMessage

sendMessage

public void sendMessage(MsnMimeMessage message)
Description copied from interface: MsnSwitchboard
This method is a shorthand for:
     sendMessage(message, false);
 

Specified by:
sendMessage in interface MsnSwitchboard
Parameters:
message - MsnMimeMessage

JML