net.rim.device.api.bluetooth
Class BluetoothSerialPortInfo

java.lang.Object
  extended by net.rim.device.api.bluetooth.BluetoothSerialPortInfo

public class BluetoothSerialPortInfo
extends Object

Encapsulates information about the current connection through the Bluetooth serial port.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

Constructor Summary
Category: Signed BluetoothSerialPortInfo(byte[] address, int serverID, String serviceName)
          Creates a new BluetoothSerialPortInfo instance.
Category: Signed BluetoothSerialPortInfo(byte[] address, int pageScanInfo, String name, int serverID, String serviceName)
          Creates a new BluetoothSerialPortInfo instance.
Category: Signed BluetoothSerialPortInfo(byte[] address, String name, int serverID, String serviceName)
          Creates a new BluetoothSerialPortInfo instance.
 
Method Summary
Category: Signed  byte[] getDeviceAddress()
          Retrieves this connection's device address in raw form.
Category: Signed  String getDeviceName()
          Retrieves this connection's device name.
Category: Signed  int getDevicePageScanInfo()
          Retrieves this connection's device page scan info.
Category: Signed  int getServerID()
          Retrieves this connection's server ID.
Category: Signed  String getServiceName()
          Retrieves this connection's service name.
Category: Signed  String toString()
          Retrieves this information object in string form.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Constructor Detail

BluetoothSerialPortInfo

public BluetoothSerialPortInfo(byte[] address,
                               int serverID,
                               String serviceName)
Creates a new BluetoothSerialPortInfo instance.

Parameters:
address - Device address for new connection.
serverID - Server ID for the new connection.
serviceName - Name for the service provided through the new connection.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

BluetoothSerialPortInfo

public BluetoothSerialPortInfo(byte[] address,
                               String name,
                               int serverID,
                               String serviceName)
Creates a new BluetoothSerialPortInfo instance.

Parameters:
address - Device address for new connection.
name - Device name, or null if device name is not known.
serverID - Server ID for the new connection.
serviceName - Name for the service provided through the new connection.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.2

BluetoothSerialPortInfo

public BluetoothSerialPortInfo(byte[] address,
                               int pageScanInfo,
                               String name,
                               int serverID,
                               String serviceName)
Creates a new BluetoothSerialPortInfo instance.

Parameters:
address - Device address for new connection.
pageScanInfo - Page scan info for the device, or 0 if unknown.
name - Device name, or null if device name is not known.
serverID - Server ID for the new connection.
serviceName - Name for the service provided through the new connection.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.2


Method Detail

toString

public String toString()
Retrieves this information object in string form.

Expect retrieved strings to be of the form:

    btspp://DeviceAddressAsString:ServerIdAsinteger
 

This method uses the Bluetooth management entity to convert the device address to a string from the raw form provided to this object's constructor.

Overrides:
toString in class Object
Returns:
String form of this information object.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getDeviceAddress

public byte[] getDeviceAddress()
Retrieves this connection's device address in raw form.

Returns:
Raw device address for this connection.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getDevicePageScanInfo

public int getDevicePageScanInfo()
Retrieves this connection's device page scan info.

Returns:
The page scan info, or 0 if unknown.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.2

getDeviceName

public String getDeviceName()
Retrieves this connection's device name.

Returns:
Device name, or null if the device name is not known.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.2

getServerID

public int getServerID()
Retrieves this connection's server ID.

Returns:
Server ID for this connection.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0

getServiceName

public String getServiceName()
Retrieves this connection's service name.

Returns:
Name of the service provided through this connection.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 4.0.0





Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.