Java Doc for MultipartMessage.java in  » 6.0-JDK-Modules » j2me » com » sun » tck » wma » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.tck.wma 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.tck.wma.MultipartMessage

All known Subclasses:   com.sun.tck.wma.mms.MultipartObject,
MultipartMessage
public interface MultipartMessage extends Message(Code)
An interface representing a multipart message. This is a subinterface of Message which contains methods to add and get MessageParts. The interface also allows to specify the subject of the message. The basic methods for manipulating the address portion of the message are inherited from Message. Additionally, this interface defines methods for adding and removing addresses to/from the "to", "cc" or "bcc" fields. Furthermore it offers methods to get and set special header fields of the message. The contents of the MultipartMessage are assembled during the invocation of the MessageConnection.send() method. The contents of each MessagePart are copied before the send message returns. Changes to the MessagePart contents after send must not appear in the transmitted message.
since:
   WMA 2.0




Method Summary
 booleanaddAddress(java.lang.String type, java.lang.String address)
     Adds an address to the multipart message.
Parameters:
  type - the adress type ("to", "cc" or "bcc") as a String.
 voidaddMessagePart(MessagePart part)
     Attaches a MessagePart to the multipart message.
Parameters:
  part - MessagePart to add
throws:
  java.lang.IllegalArgumentException - if the Content-ID of theMessagePart conflicts with a Content-ID of aMessagePart already contained in this MultiPartMessage.
 java.lang.StringgetAddress()
     Returns the "from" address associated with this message, e.g.
 java.lang.String[]getAddresses(java.lang.String type)
     Gets the addresses of the multipart message of the specified type (e.g. "to", "cc", "bcc" or "from") as String.
 java.lang.StringgetHeader(java.lang.String headerField)
     Gets the content of the specific header field of the multipart message.
 MessagePartgetMessagePart(java.lang.String contentID)
     This method returns a MessagePart from the message that matches the content-id passed as a parameter.
 MessagePart[]getMessageParts()
     Returns an array of all MessageParts of this message.
 java.lang.StringgetStartContentId()
     Returns the contentId of the start MessagePart.
 java.lang.StringgetSubject()
     Gets the subject of the multipart message.
 booleanremoveAddress(java.lang.String type, java.lang.String address)
     Removes an address from the multipart message.
 voidremoveAddresses()
     Removes all addresses of types "to", "cc", "bcc" from the multipart message.
 voidremoveAddresses(java.lang.String type)
     Removes all addresses of the specified type from the multipart message.
 booleanremoveMessagePart(MessagePart part)
     Removes a MessagePart from the multipart message.
 booleanremoveMessagePartId(java.lang.String contentID)
     Removes a MessagePart with the specific contentID from the multipart message.
Parameters:
  contentID - identifies which MessagePart must bedeleted.
 booleanremoveMessagePartLocation(java.lang.String contentLocation)
     Removes MessageParts with the specific content location from the multipart message.
 voidsetAddress(java.lang.String addr)
     Sets the "to" address associated with this message.
 voidsetHeader(java.lang.String headerField, java.lang.String headerValue)
     Sets the specified header of the multipart message.
 voidsetStartContentId(java.lang.String contentId)
     Sets the Content-ID of the start MessagePart of a multipart related message.
 voidsetSubject(java.lang.String subject)
     Sets the Subject of the multipart message.



Method Detail
addAddress
boolean addAddress(java.lang.String type, java.lang.String address)(Code)
Adds an address to the multipart message.
Parameters:
  type - the adress type ("to", "cc" or "bcc") as a String. Each message can have none or multiple "to","cc" and "bcc" addresses. Eash address is added separately. Themethod is not case sensitive. The implementation of MessageConnection.send() makes sure that the "from"address is set correctly.
Parameters:
  address - the address as a String true if it was possible to add the address, elsefalse
throws:
  java.lang.IllegalArgumentException - if type is none of "to", "cc",or "bcc" or if address is not valid.
See Also:   MultipartMessage.setAddress(String)



addMessagePart
void addMessagePart(MessagePart part) throws SizeExceededException(Code)
Attaches a MessagePart to the multipart message.
Parameters:
  part - MessagePart to add
throws:
  java.lang.IllegalArgumentException - if the Content-ID of theMessagePart conflicts with a Content-ID of aMessagePart already contained in this MultiPartMessage. The Content-IDs must be uniquewithin a MultipartMessage.
throws:
  NullPointerException - if the parameter is null
throws:
  SizeExceededException - if it's not possible to attach the MessagePart.



getAddress
java.lang.String getAddress()(Code)
Returns the "from" address associated with this message, e.g. address of the sender. If the message is a newly created message, e.g. not a received one, then the first "to" address is returned. Returns null if the "from" or "to" address for the message, dependent on the case, are not set. Note: This design allows sending responses to a received message easily by reusing the same Message object and just replacing the payload. The address field can normally be kept untouched (unless the used messaging protocol requires some special handling of the address). the "from" or "to" address of this message, or nullif the address that is expected as a result of this method is notset
See Also:   MultipartMessage.setAddress(String)



getAddresses
java.lang.String[] getAddresses(java.lang.String type)(Code)
Gets the addresses of the multipart message of the specified type (e.g. "to", "cc", "bcc" or "from") as String. The method is not case sensitive.
Parameters:
  type - the type of address list to return the addresses as a String array or nullif this value is not present.



getHeader
java.lang.String getHeader(java.lang.String headerField)(Code)
Gets the content of the specific header field of the multipart message.
Parameters:
  headerField - the name of the header field as a String the content of the specified header field as a String or null of the specified headerfield is not present.
throws:
  SecurityException - if the access to specified header field is restricted
throws:
  IllegalArgumentException - if headerField is unknown
See Also:   Appendix
See Also:    D for known headerFields
See Also:   MultipartMessage.setHeader



getMessagePart
MessagePart getMessagePart(java.lang.String contentID)(Code)
This method returns a MessagePart from the message that matches the content-id passed as a parameter.
Parameters:
  contentID - the content-id for the MessagePart to bereturned MessagePart that matches the provided content-id ornull if there is no MessagePart in thismessage with the provided content-id
throws:
  NullPointerException - if the parameter is null



getMessageParts
MessagePart[] getMessageParts()(Code)
Returns an array of all MessageParts of this message. array of MessageParts, or null if noMessageParts are available



getStartContentId
java.lang.String getStartContentId()(Code)
Returns the contentId of the start MessagePart. The start MessagePart is set in setStartContentId(String) the content-id of the start MessagePart ornull if the start MessagePart is not set.
See Also:   MultipartMessage.setStartContentId(String)



getSubject
java.lang.String getSubject()(Code)
Gets the subject of the multipart message. the message subject as a String or nullif this value is not present.
See Also:   MultipartMessage.setSubject



removeAddress
boolean removeAddress(java.lang.String type, java.lang.String address)(Code)
Removes an address from the multipart message.
Parameters:
  type - the address type ("to", "cc", "bcc", or "from") as aString
Parameters:
  address - the address as a String true if it was possible to delete the address, elsefalse
throws:
  NullPointerException - is type is null
throws:
  java.lang.IllegalArgumentException - if type is none of "to", "cc","bcc", or "from"



removeAddresses
void removeAddresses()(Code)
Removes all addresses of types "to", "cc", "bcc" from the multipart message.
See Also:   MultipartMessage.setAddress(String)
See Also:   MultipartMessage.addAddress(String,String)



removeAddresses
void removeAddresses(java.lang.String type)(Code)
Removes all addresses of the specified type from the multipart message.
Parameters:
  type - the address type ("to", "cc", "bcc", or "from") as a String
throws:
  NullPointerException - if type is null
throws:
  java.lang.IllegalArgumentException - if type is none of "to", "cc","bcc", or "from"



removeMessagePart
boolean removeMessagePart(MessagePart part)(Code)
Removes a MessagePart from the multipart message.
Parameters:
  part - MessagePart to delete true if it was possible to remove theMessagePart, else false
throws:
  NullPointerException - if the parameter is null



removeMessagePartId
boolean removeMessagePartId(java.lang.String contentID)(Code)
Removes a MessagePart with the specific contentID from the multipart message.
Parameters:
  contentID - identifies which MessagePart must bedeleted. true if it was possible to remove theMessagePart, else false
throws:
  NullPointerException - if the parameter is null



removeMessagePartLocation
boolean removeMessagePartLocation(java.lang.String contentLocation)(Code)
Removes MessageParts with the specific content location from the multipart message. All MessageParts with the specified contentLocation are removed.
Parameters:
  contentLocation - content location (file name) of the MessagePart true if it was possible to remove theMessagePart, else false
throws:
  NullPointerException - if the parameter is null



setAddress
void setAddress(java.lang.String addr)(Code)
Sets the "to" address associated with this message. It works the same way as addAddress("to", addr). The address may be set to null.
Parameters:
  addr - address for the message
See Also:   MultipartMessage.getAddress()
See Also:   MultipartMessage.addAddress(String,String)



setHeader
void setHeader(java.lang.String headerField, java.lang.String headerValue)(Code)
Sets the specified header of the multipart message. The header value can be null.
Parameters:
  headerField - the name of the header field as a String
Parameters:
  headerValue - the value of the header as a String
throws:
  java.lang.IllegalArgumentException - if headerField isunknown, or if headerValue is not correct (depends onheaderField!)
throws:
  NullPointerException - if headerField is null
throws:
  SecurityException - if the access to specified header field isrestricted
See Also:   MultipartMessage.getHeader(String)
See Also:   Appendix
See Also:    D



setStartContentId
void setStartContentId(java.lang.String contentId)(Code)
Sets the Content-ID of the start MessagePart of a multipart related message. The Content-ID may be set to null. The StartContentId is set for the MessagePart that is used to reference the other MessageParts of the MultipartMessage for presentation or processing purposes.
Parameters:
  contentId - as a String
throws:
  java.lang.IllegalArgumentException - if contentId isnone of the added MessagePart objects matches thecontentId
See Also:   MultipartMessage.getStartContentId()



setSubject
void setSubject(java.lang.String subject)(Code)
Sets the Subject of the multipart message. This value can be null.
Parameters:
  subject - the message subject as a String
See Also:   MultipartMessage.getSubject()



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.