|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.blackberry.api.mail.Session
public final class Session
Provides access to email services, storage, and transport.
Service,
Store,
Transport| Method Summary | ||
|---|---|---|
|
static void |
addDefaultSessionListener(DefaultSessionListener dl)
Registers a listener for Default Session change notification. |
|
static void |
addSendListenerForPINMessages(SendListener listener)
Adds a listener to the list of listeners that are notified prior to PIN messages being sent. |
|
static void |
addViewListener(ViewListener listener)
Registers a listener for view notification. |
|
static Session |
getDefaultInstance()
Retrieves this device's default session. |
|
static Session |
getDefaultInstance(ServiceConfiguration sc)
Retrieves default session based on provided service configuration. |
|
static Session |
getInstance(ServiceConfiguration sc)
Retrieves session by provided service configuration. |
|
ServiceConfiguration |
getServiceConfiguration()
Retrieves the service configuration for this service. |
|
Store |
getStore()
Retrieves a Store instance to access message storage on this device. |
|
Transport |
getTransport()
Retrieves a Transport instance to access the email transport protocol on the handheld. |
|
static void |
removeDefaultSessionListener(DefaultSessionListener listener)
De-registers a default Session listener. |
|
static void |
removeSendListenerForPINMessages(SendListener listener)
Removes a listener from the list of listeners that are notified prior to PIN messages being sent. |
|
static void |
removeViewListener(ViewListener listener)
De-registers a view notification listener. |
|
static Session |
waitForDefaultSession()
Retrieves this device's default mail service (blocking). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Session getDefaultInstance()
Use this method to retrieve 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.
ControlledAccessException - if the application is not granted to access the default email service.public static void addSendListenerForPINMessages(SendListener listener)
listener - the listener to add; may be nullSession.removeSendListenerForPINMessages(SendListener)public static void removeSendListenerForPINMessages(SendListener listener)
listener - the listener to removeSession.addSendListenerForPINMessages(SendListener)public static Session getInstance(ServiceConfiguration sc)
sc - Service configuration information from which to retrieve service.
ControlledAccessException - if the application is not granted to access the email service.
public static Session waitForDefaultSession()
throws NoSuchServiceException
Note: This call blocks indefinitely if no service is available.
NoSuchServiceException - If the default service can't be
instantiated (usually due to lack of Service Book configuration
information on the device).
ControlledAccessException - if the application is not granted to access the email service.public static Session getDefaultInstance(ServiceConfiguration sc)
sc - Service configuration for which to retrieve the mail service.
ControlledAccessException - if the application is not granted to access the email service.public ServiceConfiguration getServiceConfiguration()
ControlledAccessException - if the application is not granted to access the email service or the email functionality on the device.public Store getStore()
ControlledAccessException - if the application is not granted to access the email service or the email functionality on the device..public Transport getTransport()
ControlledAccessException - if the application is not granted to access the email service or the email functionality on the device.public static void addViewListener(ViewListener listener)
vl - View listener to add.
ControlledAccessException - if the application is not granted to access the email functionality on the device.
NullPointerException - if ViewListener is null.public static void removeViewListener(ViewListener listener)
v1 - View listener to remove.public static void addDefaultSessionListener(DefaultSessionListener dl)
dl - DefaultSessionListener listener to add.
NullPointerException - if the listener is null.
ControlledAccessException - if the application is not granted to access the email functionality on the device.public static void removeDefaultSessionListener(DefaultSessionListener listener)
d1 - DefaultSessionListener to remove. If the specified listener is not registered or if the parameter is null, this method silently returns with no action.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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