net.rim.blackberry.api.bbm.platform.io
Class BBMPlatformSessionListener

java.lang.Object
  |
  +--net.rim.blackberry.api.bbm.platform.io.BBMPlatformSessionListener
All Implemented Interfaces:
BBMPlatformConnectionListener

public abstract class BBMPlatformSessionListener
extends Object
implements BBMPlatformConnectionListener

BBMPlatformSessionListener is required for BBMPlatformSession to be created, and provides callback methods for BBMPlatformSession events.
Note that the Platform cannot guarantee all the packets will come in order, so applicaitons will have to make sure the sequence of events if needed.


Field Summary
static int CONTACT_INVITED_BY_OTHER
          Used in BBMPlatformConnectionListener.contactsJoined(BBMPlatformConnection connection, BBMPlatformContactList contactList, String cookie, int type) and called by the existing contacts of the BBMPlatformSession except the join invitation sender.
static int CONTACT_JOINED_BEFORE_ME
          Used in BBMPlatformConnectionListener.contactsJoined(BBMPlatformConnection connection, BBMPlatformContactList contactList, String cookie, int type) and called by the new contact who just joined the BBMPlatformSession.
 
Fields inherited from interface net.rim.blackberry.api.bbm.platform.io.BBMPlatformConnectionListener
CONTACT_INVITED_BY_ME, CONTACT_INVITING_ME
 
Constructor Summary
BBMPlatformSessionListener()
          Creates a new instance of a BBMPlatformSessionListener.
 
Method Summary
abstract  void broadcastDataReceived(BBMPlatformSession session, BBMPlatformContact sender, BBMPlatformData data)
          Called when broadcasting data is received from a contacts who has been in the session.
abstract  void contactsRemoved(BBMPlatformSession session, BBMPlatformContact removedBy, BBMPlatformContactList contactList)
          Called when a subset of contacts is removed from a session.
 void joinRequestCanceled(BBMPlatformConnection connection, BBMPlatformIncomingJoinRequest request, int reasonCode)
          Called when the user, who is hosting a public connection, has received a join request from a contact but has not yet accepted it, and the contact tries to cancel the join request.
 void joinRequestReceived(BBMPlatformConnection connection, BBMPlatformIncomingJoinRequest request, String cookie)
          Called when the user, who is hosting a public connection, receives a join request to the connection.
 
Methods inherited from interface net.rim.blackberry.api.bbm.platform.io.BBMPlatformConnectionListener
contactDeclined, contactLeft, contactsInvited, contactsJoined, dataReceived
 

Field Detail

CONTACT_INVITED_BY_OTHER

public static final int CONTACT_INVITED_BY_OTHER
Used in BBMPlatformConnectionListener.contactsJoined(BBMPlatformConnection connection, BBMPlatformContactList contactList, String cookie, int type) and called by the existing contacts of the BBMPlatformSession except the join invitation sender. contactList will consist of the join invitation receiver only.
Since:
BBM SDK 1.0

CONTACT_JOINED_BEFORE_ME

public static final int CONTACT_JOINED_BEFORE_ME
Used in BBMPlatformConnectionListener.contactsJoined(BBMPlatformConnection connection, BBMPlatformContactList contactList, String cookie, int type) and called by the new contact who just joined the BBMPlatformSession. contactList will consist of all existing contacts in the BBMPlatformSession except the join invitation sender.
Since:
BBM SDK 1.0
Constructor Detail

BBMPlatformSessionListener

public BBMPlatformSessionListener()
Creates a new instance of a BBMPlatformSessionListener.
Since:
BBM SDK 1.0
Method Detail

broadcastDataReceived

public abstract void broadcastDataReceived(BBMPlatformSession session,
                                           BBMPlatformContact sender,
                                           BBMPlatformData data)
Called when broadcasting data is received from a contacts who has been in the session.
Parameters:
session - The session where a message comes from
sender - the contact who broadcasted the data
data - the data delivered, and it is always a public message that will be received by all participants in the session.
Since:
BBM SDK 1.0

contactsRemoved

public abstract void contactsRemoved(BBMPlatformSession session,
                                     BBMPlatformContact removedBy,
                                     BBMPlatformContactList contactList)
Called when a subset of contacts is removed from a session.
Parameters:
session - the session where the contacts are removed.
contactList - consists of the contacts that are removed.
removedBy - the participant who removed the contacts.
Since:
BBM SDK 1.0

joinRequestCanceled

public void joinRequestCanceled(BBMPlatformConnection connection,
                                BBMPlatformIncomingJoinRequest request,
                                int reasonCode)
Called when the user, who is hosting a public connection, has received a join request from a contact but has not yet accepted it, and the contact tries to cancel the join request.
Parameters:
connection - the public connection the user is hosting.
request - the incoming request that has been canceled by the request sender.
reasonCode - It's defined in IOErrorCode to explain why the request is canceled.
Since:
BBM SDK 1.0

joinRequestReceived

public void joinRequestReceived(BBMPlatformConnection connection,
                                BBMPlatformIncomingJoinRequest request,
                                String cookie)
Called when the user, who is hosting a public connection, receives a join request to the connection.
Parameters:
connection - the public connection the user is hosting.
request - the incoming request the host receives.
cookie - a string parameter defined and sent by the request sender. For example, it can be a game level.
Since:
BBM SDK 1.0



Copyright 1999- Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.