|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ecf.protocol.msn.MsnClient
public final class MsnClient
The MsnClient class allows a developer to easily create a client that will authenticate the user and establish a connection with the MSN servers.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Constructor Summary | |
---|---|
MsnClient()
Instantiate a new MsnClient that defaults to setting the user as being online and available when signing in. |
|
MsnClient(Status initialStatus)
Instantiate a new MsnClient that set the user to the specified status when signing in. |
Method Summary | |
---|---|
void |
addSessionListener(ISessionListener listener)
Add an ISessionListener to this client. |
void |
connect(java.lang.String userEmail,
java.lang.String password)
Connects the client to the MSN servers. |
ChatSession |
createChatSession(java.lang.String email)
Creates a ChatSession to connect to the specified contact. |
void |
disconnect()
Disconnects the user from the MSN servers. |
ContactList |
getContactList()
Returns the contact list that is associated with this client. |
java.lang.String |
getDisplayName()
Returns the displayed name of this user. |
java.lang.String |
getPersonalMessage()
Retrieves the user's current personal message. |
Status |
getStatus()
Returns the status that the user is currently in. |
java.lang.String |
getUserEmail()
Returns the user's account's email address. |
void |
removeSessionListener(ISessionListener listener)
Removes an ISessionListener from this client. |
void |
setDisplayName(java.lang.String newName)
Sets the display name of this user. |
void |
setPersonalMessage(java.lang.String personalMessage)
Sets the user's personal message to the specified string. |
void |
setStatus(Status status)
Changes the user's status to the provided status flag. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MsnClient()
public MsnClient(Status initialStatus)
initialStatus
- the status that a user would like to sign on to the servers
as, refer to Status.ONLINE
and other static variables
for the available options.Method Detail |
---|
public void connect(java.lang.String userEmail, java.lang.String password) throws java.io.IOException
userEmail
- the user's email address that is associated with an MSN
accountpassword
- the email's corresponding password
java.io.IOException
- If an I/O error occurred while connecting to the dispatch or
notification servers.public void disconnect()
ChatSession
s that may have been created since the client was
instantiated are not disconnected automatically in this method.
public void setStatus(Status status) throws java.io.IOException
status
- the status that the user wishes to change to
java.io.IOException
- if some problem setting status (e.g. disconnected).public Status getStatus()
public ContactList getContactList()
public ChatSession createChatSession(java.lang.String email) throws java.io.IOException
ChatSession
to connect to the specified contact.
email
- the contact to connect to
java.io.IOException
- If an I/O error occurredpublic void setDisplayName(java.lang.String newName) throws java.io.IOException
newName
- the new name of this user
java.io.IOException
public java.lang.String getDisplayName()
public java.lang.String getUserEmail()
public void setPersonalMessage(java.lang.String personalMessage) throws java.io.IOException
personalMessage
- the new message to use as the user's personal message
java.io.IOException
- If an I/O error occurred while sending the data to the
notification serverpublic java.lang.String getPersonalMessage()
public void addSessionListener(ISessionListener listener)
listener
- the listener to be addedpublic void removeSessionListener(ISessionListener listener)
listener
- the listener to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |