net.rim.blackberry.api.mail
Class Service

java.lang.Object
  extended by 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.

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

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

isConnected

public boolean isConnected()
Determines whether this service is connected.

Returns:
True if the service is connected; otherwise, false.
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 3.6.0

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

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

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

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

removeServiceListener

public void removeServiceListener(ServiceListener sl)
De-registers a service listener.

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