SHOW Signed
 

net.rim.blackberry.api.mail
Class Service

java.lang.Object
  |
  +--net.rim.blackberry.api.mail.Service
Direct Known Subclasses:
Store, Transport

public abstract class Service
extends Object

This class represents an email service on the BlackBerry handheld device. An email service enables messaging functionality, including the creating, editing, sending, and receiving of email messages, and optionally communicating these operations with a mail server.

The default service is implicitly connected.

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 3.6.0
See Also:
Transport, Store, ServiceConfiguration

Method Summary
 Category: Signed  void addServiceListener(ServiceListener sl)
          Registers a service listener to handle service events for this server.
 Category: Signed  ServiceConfiguration getServiceConfiguration()
          Retrieves the service configuration for the current email service.
 Category: Signed  boolean isConnected()
          Determines whether this service is connected.
 Category: Signed  void removeServiceListener(ServiceListener sl)
          De-registers a service listener.
 Category: Signed  void setConnected(boolean connected)
          Sets the connection status of a service.
 Category: Signed  String toString()
          Retrieves a human-readable string for this service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

addServiceListener

public void addServiceListener(ServiceListener sl)
Registers a service listener to handle service events for this server.

Service listeners are invoked when something in the service changes, such as the addition or removal of a Folder.

Parameters:
sl - Service listener to register.
Since:
JDE 4.0.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.

getServiceConfiguration

public ServiceConfiguration getServiceConfiguration()
Retrieves the service configuration for the current email service.

By default, this method returns null; implementing subclasses should override this to provide more specific functionality.

Returns:
Service configuration for the current email address service, or null if no configuration available.
Since:
JDE 3.6.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.

isConnected

public boolean isConnected()
Determines whether this service is connected.
Returns:
True if the service is connected; otherwise, false.
Since:
JDE 3.6.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.

removeServiceListener

public void removeServiceListener(ServiceListener sl)
De-registers a service listener.
Parameters:
sl - Service listener to de-register.
Since:
JDE 4.0.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.

setConnected

public void setConnected(boolean connected)
Sets the connection status of a service.
Parameters:
connected - True to connect the service; false to disconnect the service.
Since:
JDE 3.6.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.

toString

public String toString()
Retrieves a human-readable string for this service.

By default, this method returns an empty string; implementing subclasses should override this to provide more specific information.

Overrides:
toString in class Object
Returns:
A human-readable string that describes this service. For example, the default name for the mail service on a default device is "Email". The email service name may be set in the “Redirector Settings” section of the Deskktop Manager application.
Since:
JDE 3.6.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.