FileDocCategorySizeDatePackage
SDP.javaAPI DocphoneME MR2 API (J2ME)3385Wed May 02 18:00:32 BST 2007com.sun.kvem.jsr082.bluetooth

SDP

public class SDP extends Object
Contains common Servive Discovery Protocol data.

Fields Summary
private static com.sun.midp.security.SecurityToken
internalSecurityToken
Internal security token that grants access to restricted API.
private static Object
systemToken
Special object used by SDP to authenticate internal URL's.
public static final String
UUID
SDP UUID.
public static final int
PSM
SDP server PSM. This value is defined by Bluetooth specification
Constructors Summary
Methods Summary
public static booleancheckSystemToken(java.lang.Object token)
Checks that given token is an internal one. Used to authenticate an URL as generated by SDP.

param
token token to check
return
true if the object given is exactly the internal system token, false otherwise

        return token == systemToken;
    
static javax.microedition.io.ConnectiongetL2CAPConnection(java.lang.String name)
Creates and opens btl2cap connection for using by SDP.

param
name btl2cap connection URL without protocol name
return
required connection instance, that is L2CAPConnection for client or L2CAPConnectionNotifier for server
exception
IOException if connection fails

    
                                                            
          
        BluetoothUrl url = new BluetoothUrl(BluetoothUrl.L2CAP, name, systemToken);
        Protocol l2cap = new Protocol();
        return l2cap.openPrim(internalSecurityToken, url, Connector.READ_WRITE);