net.rim.blackberry.api.mail
Class Transport

java.lang.Object
  extended by net.rim.blackberry.api.mail.Service
      extended by net.rim.blackberry.api.mail.Transport

public abstract class Transport
extends Service

Represents an e-mail transport protocol.

You retrieve a Transport instance by invoking Session.getTransport().

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 static void more(BodyPart bp, boolean reqAll)
          Requests more data from the server for a body part on which more is available.
Category: Signed static void send(Message msg)
          Sends a message.
Category: Signed static void send(Message msg, ServiceConfiguration sc)
          Sends a message using the specified Service.
 
Methods inherited from class net.rim.blackberry.api.mail.Service
addServiceListener, getServiceConfiguration, isConnected, removeServiceListener, setConnected, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Method Detail

send

public static void send(Message msg)
                 throws MessagingException
Sends a message. To send a message with an attachment, #FileSupportedAttachmentPart instead of #SupportedAttachmentPart should be added to the #Multipart object.

Parameters:
msg - Message to send.
Throws:
SendFailedException - If the message cannot be sent to one or more of the recipients.
ControlledAccessException - if the application is not granted to access the email service or the email functionality on the device.
MessagingException
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

send

public static void send(Message msg,
                        ServiceConfiguration sc)
                 throws MessagingException
Sends a message using the specified Service. To send a message with an attachment, #FileSupportedAttachmentPart instead of #SupportedAttachmentPart should be added to the #Multipart object.

Parameters:
msg - Message to send.
sc - ServiceConfiguration
Throws:
MessagingException - If the message cannot be sent to one or more of the recipients.
ControlledAccessException - if the application is not granted to access the email service, not granted to access the email functionality on the device, or not granted to use non-corporate resource to conduct corporate activities and vice versa.
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.6.0

more

public static void more(BodyPart bp,
                        boolean reqAll)
                 throws MessagingException
Requests more data from the server for a body part on which more is available.

Note: Do not use this method to download an attachment. Instead, use AttachmentDownloadManager.

Invoke hasMore on the body part to determine if more data is available. If a more request is already outstanding on the body part, this method takes no action. Invoke moreRequestSent on the body part to determine if a request has already been sent for more data.

This method is not blocking and simply enqueues More request into the communication queue. The parent Message object will notify its MessageListener when more data is retrieved from server. The message listener will be notified on any message changes so the BodyPart.hasMore() and Part.getSize() methods should be called in order to check whether the particular body part has changed. The Message can replace its BodyParts objects so those cannot be cached and should be retrieved from Message in the listener callback.

Parameters:
bp - Body part for which to request more data.
reqAll - True to request all the data available or false to request only up to 1500 bytes.
Throws:
SendFailedException - If the request could not be sent.
MessagingException - If the body part does not belong to any Message object, or if the provided body part does not support the more operation
ControlledAccessException - if the application is not granted to access the email service or the email functionality on the device.
See Also:
Message.addMessageListener(MessageListener)
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





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