SHOW Signed
 

net.rim.device.api.servicebook
Class ServiceRouting

java.lang.Object
  |
  +--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:
JDE 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


addListener

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

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

getInstance

public static ServiceRouting getInstance()
Get the ServiceRouting object.

Returns:
The ServiceRouting object.
Since:
JDE 4.1.0
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.

isSerialBypassActive

public boolean isSerialBypassActive()
Determines if the device is currently hosting serial bypass activity.
Returns:
true if a serial bypass connection is currently active
Since:
JDE 4.1.0
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.

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.
Since:
JDE 4.1.0
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.

removeListener

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

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



Copyright 1999-2009 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.