net.rim.device.api.servicebook
Class ServiceRouting

java.lang.Object
  extended by net.rim.device.api.servicebook.ServiceRouting

public final class ServiceRouting
extends Object

This class provides an application with the ability to route traffic through a USB or Bluetooth connection to the desktop using the standard connectivity protocols. This class leverages the least-cost routing feature; allowing the user to perform least-cost routing over a Bluetooth connection to their computer rather than relying on USB connectivity. Use this class to determine: when the user’s BlackBerry device is connected to a computer using Bluetooth or USB, if a particular service is currently enabled for serial bypass or least-cost routing, and to add and remove listeners that provide updates on when the device obtains and loses the ability to perform least-cost routing. For more information on this class, including code samples, see the BlackBerry Developer Newsletter.

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.1.0

Method Summary
Category: Signed  void addListener(ServiceRoutingListener listener)
          Add a listener for BlackBerry data service routing changes.
Category: Signed static ServiceRouting getInstance()
          Get the ServiceRouting object.
Category: Signed  boolean isSerialBypassActive()
          Determines if the device is currently hosting serial bypass activity.
Category: Signed  boolean isSerialBypassActive(String service)
          Determines if the device is currently hosting serial bypass activity.
Category: Signed  void removeListener(ServiceRoutingListener listener)
          Remove a listener for BlackBerry data service routing changes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

getInstance

public static ServiceRouting getInstance()
Get the ServiceRouting object.

Returns:
The ServiceRouting 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.1.0

isSerialBypassActive

public boolean isSerialBypassActive()
Determines if the device is currently hosting serial bypass activity.

Returns:
true if a serial bypass connection is currently active
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.1.0

isSerialBypassActive

public boolean isSerialBypassActive(String service)
Determines if the device is currently hosting serial bypass activity.

Parameters:
service - The relevant service, a UID of a ServiceRecord.
Returns:
true if a serial bypass connection is currently active. If a null value is used in place of the service parameter, the method returns true if any service is active.
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.1.0

addListener

public void addListener(ServiceRoutingListener listener)
Add a listener for BlackBerry data service routing changes.

Parameters:
listener - Listener for BlackBerry data service routing changes.
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.1.0

removeListener

public void removeListener(ServiceRoutingListener listener)
Remove a listener for BlackBerry data service routing changes.

Parameters:
listener - Listener for BlackBerry data service routing changes.
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.1.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal