SHOW Signed

net.rim.blackberry.api.mail
Interface AttachmentHandler


public interface AttachmentHandler

An application must implement the AttachmentHandler interface to perform custom attachment actions.

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.


Method Summary
 Category: Signed  String menuString()
          Defines the menu item to display for this attachment handler.
 Category: Signed  void run(Message m, SupportedAttachmentPart p)
          Performs custom processing on an attachment.
 Category: Signed  boolean supports(String contentType)
          Determines whether this attachment handler accepts a specific content type.
 

Method Detail

supports

public boolean supports(String contentType)
Determines whether this attachment handler accepts a specific content type. This method is invoked when the handheld receives an attachment. Implement this method to register the content type that this attachment handler accepts.

Parameters:
contentType - A MIME content type.
Returns:
True if this handler accepts the specified content type
Since:
JDE 3.6
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.

menuString

public String menuString()
Defines the menu item to display for this attachment handler. This method is invoked when the user selects an attachment in the Messages screen. Implement this method to return the menu item string to display in the Messages screen when the user selects a supported attachment.

Returns:
The menu item string to display in the Messages screen when this attachment is in focus.
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.

run

public void run(Message m,
                SupportedAttachmentPart p)
Performs custom processing on an attachment. This method is invoked when the corresponding menu item is selected in the Messages screen.

Note: This method is invoked on the event thread of the Messages application.

Parameters:
m - The message that contains the attachment.
p - The attachment for this attachment handler to process.
Since:
JDE 3.6
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.