net.rim.blackberry.api.bbm.platform.io
Interface BBMPlatformIncomingJoinRequest

All Superinterfaces:
BBMPlatformJoinRequest

public interface BBMPlatformIncomingJoinRequest
extends BBMPlatformJoinRequest

This interface defines an incoming join request that the user receives when he or she is hosting a public connection.


Field Summary
 
Fields inherited from interface net.rim.blackberry.api.bbm.platform.io.BBMPlatformJoinRequest
REQUEST_STATUS_ACCEPTED, REQUEST_STATUS_CANCELED, REQUEST_STATUS_DECLINED, REQUEST_STATUS_PENDING
 
Method Summary
 void accept(String cookie)
          The user (i.e., the host) can call this method to accept a pending join request to the public connection.
 void decline()
          The user (i.e., the host) can call this method to decline a pending join request to the public connection.
 String getCookie()
          This API is used to get the cookie parameter that was sent by the request sending side.
 BBMPlatformContact getRequester()
          This API is used to get the person who sent a join request to the user.
 
Methods inherited from interface net.rim.blackberry.api.bbm.platform.io.BBMPlatformJoinRequest
getRequestId, getStatus
 

Method Detail

accept

public void accept(String cookie)
The user (i.e., the host) can call this method to accept a pending join request to the public connection.
Once the join request has been accepted, it will be removed from both the sender's and the user's pending queue. Also, the request's status will be changed to BBMPlatformJoinRequest.REQUEST_STATUS_ACCEPTED.
If the request being accepted has already been canceled by the sender, or has been accepted or declined by the user, calling this API will do nothing.
Note that the Platform doesn't persist the requests, that is, on device reset all pending requests will be cleared.
Parameters:
cookie - The host can pass a String parameter to the request sender when accepting the join request.
Throws:
IllegalArgumentException - if cookie is longer than 128 characters.
PersistentContentException - when Content Protection is enabled and device is locked.
Since:
BBM SDK 1.0

decline

public void decline()
The user (i.e., the host) can call this method to decline a pending join request to the public connection.
Once the join request has been declined, it will be removed from both the sender's and the user's pending queue. Also, the request's status will be changed to BBMPlatformJoinRequest.REQUEST_STATUS_DECLINED.
If the request being declined has already been canceled by the sender, or has been accepted or declined by the user, calling this API will do nothing.
Throws:
PersistentContentException - when Content Protection is enabled and device is locked.
Since:
BBM SDK 1.0

getCookie

public String getCookie()
This API is used to get the cookie parameter that was sent by the request sending side.
Returns:
The optional parameter that was provided by the request sender when sending the join request to the host. This parameter can be null, or can be a game level for example.
Since:
BBM SDK 1.0

getRequester

public BBMPlatformContact getRequester()
This API is used to get the person who sent a join request to the user.
When user is hosting a public connection within an application via BBMPlatformConnection.setPublic(), other people who have the same application can send join requests to the user. If the user accepts the join request, the request sender will be connected with the user and from then then on they can share data to each other.
Returns:
The person who sent the join request. Note that the person is not necessary to be in the user's BBM contact list.
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.