SHOW Signed

net.rim.blackberry.api.mail
Class Session

java.lang.Object
  |
  +--net.rim.blackberry.api.mail.Session

public final class Session
extends Object

Provides provides access to email services, storage, and transport.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0
See Also:
Service, Store, Transport

Method Summary
 Category: Signed static Session getDefaultInstance()
          Retrieves the default session associated with the handheld (typically the enterprise email account).
 Category: Signed static Session getDefaultInstance(ServiceConfiguration sc)
          Retrieves a particular session, based on the provided service configuration.
 Category: Signed  ServiceConfiguration getServiceConfiguration()
          Retrieves the service configuration for this service.
 Category: Signed  Store getStore()
          Retrieves a Store instance to access message storage on the handheld.
 Category: Signed  Transport getTransport()
          Retrieves a Transport instance to access the email transport protocol on the handheld.
 Category: Signed static Session waitForDefaultSession()
          Retrieves the default mail service on the handheld and waits until a service is available.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultInstance

public static Session getDefaultInstance()

Retrieves the default session associated with the handheld (typically the enterprise email account).

There is a possible timing issue with startup. If the various service book entries are not yet present on the handheld, this call returns null. This does not always mean that no service is available; it is possible that the service just is not yet registered.

Returns:
The default session instance associated with the handheld, or null if one can't be created (for instance, due to lack of Service Book configuration information on the device)
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

waitForDefaultSession

public static Session waitForDefaultSession()
                                     throws NoSuchServiceException
Retrieves the default mail service on the handheld and waits until a service is available.

Note: This call blocks indefinitely if no service is available.

Throws:
NoSuchServiceException - if the default service can't be instantiated (usually due to lack of Service Book configuration information on the device)
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getDefaultInstance

public static Session getDefaultInstance(ServiceConfiguration sc)
Retrieves a particular session, based on the provided service configuration.

Parameters:
sc - The session configuration for which to retrieve the mail service.
Returns:
The session instance associated with the configuration provided, or null if one can't be created (for instance, because the device doesn't contain valid Service Book information for the named service)
Since:
JDE 3.7.0
See Also:
ServiceConfiguration
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getServiceConfiguration

public ServiceConfiguration getServiceConfiguration()
Retrieves the service configuration for this service.

Returns:
The configuration for this service.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getStore

public Store getStore()
Retrieves a Store instance to access message storage on the handheld.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

getTransport

public Transport getTransport()
Retrieves a Transport instance to access the email transport protocol on the handheld.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.