Java Doc for Message.java in  » Net » openfire » org » xmpp » packet » 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 » Net » openfire » org.xmpp.packet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.xmpp.packet.Packet
      org.xmpp.packet.Message

All known Subclasses:   org.jivesoftware.openfire.OfflineMessage,  org.xmpp.muc.Invitation,
Message
public class Message extends Packet (Code)
Message packet.

A message can have one of several Type Types . For each message type, different message fields are typically used as follows:

 Message type
FieldNormalChatGroup ChatHeadlineError
subject SHOULDSHOULD NOTSHOULD NOTSHOULD NOTSHOULD NOT
thread OPTIONALSHOULDOPTIONALOPTIONALSHOULD NOT
body SHOULDSHOULDSHOULDSHOULDSHOULD NOT
error MUST NOTMUST NOTMUST NOTMUST NOTMUST


Inner Class :public enum Type


Constructor Summary
public  Message()
     Constructs a new Message.
public  Message(Element element)
     Constructs a new Message using an existing Element.
public  Message(Element element, boolean skipValidation)
     Constructs a new Message using an existing Element.

Method Summary
public  ElementaddChildElement(String name, String namespace)
     Adds a new child element to this packet with the given name and namespace.
public  MessagecreateCopy()
     Returns a deep copy of this Message.
public  StringgetBody()
     Returns the body of this message or null if there is no body.
public  ElementgetChildElement(String name, String namespace)
     Returns the first child element of this packet that matches the given name and namespace.
public  StringgetSubject()
     Returns the subject of this message or null if there is no subject..
public  StringgetThread()
     Returns the thread value of this message, an identifier that is used for tracking a conversation thread ("instant messaging session") between two entities.
public  TypegetType()
    
public  voidsetBody(String body)
     Sets the body of this message.
public  voidsetSubject(String subject)
     Sets the subject of this message.
public  voidsetThread(String thread)
     Sets the thread value of this message, an identifier that is used for tracking a conversation thread ("instant messaging session") between two entities.
public  voidsetType(Type type)
     Sets the type of this message.


Constructor Detail
Message
public Message()(Code)
Constructs a new Message.



Message
public Message(Element element)(Code)
Constructs a new Message using an existing Element. This is useful for parsing incoming message Elements into Message objects.
Parameters:
  element - the message Element.



Message
public Message(Element element, boolean skipValidation)(Code)
Constructs a new Message using an existing Element. This is useful for parsing incoming message Elements into Message objects. Stringprep validation on the TO address can be disabled. The FROM address will not be validated since the server is the one that sets that value.
Parameters:
  element - the message Element.
Parameters:
  skipValidation - true if stringprep should not be applied to the TO address.




Method Detail
addChildElement
public Element addChildElement(String name, String namespace)(Code)
Adds a new child element to this packet with the given name and namespace. The newly created Element is returned. This is a convenience method to avoid manipulating this underlying packet's Element instance directly.

Child elements in extended namespaces are used to extend the features of XMPP. Examples include a "user is typing" indicator and invitations to group chat rooms. Although any valid XML can be included in a child element in an extended namespace, many common features have been standardized as Jabber Enhancement Proposals (JEPs).
Parameters:
  name - the element name.
Parameters:
  namespace - the element namespace. the newly created child element.




createCopy
public Message createCopy()(Code)
Returns a deep copy of this Message. a deep copy of this Message.



getBody
public String getBody()(Code)
Returns the body of this message or null if there is no body. the body.



getChildElement
public Element getChildElement(String name, String namespace)(Code)
Returns the first child element of this packet that matches the given name and namespace. If no matching element is found, null will be returned. This is a convenience method to avoid manipulating this underlying packet's Element instance directly.

Child elements in extended namespaces are used to extend the features of XMPP. Examples include a "user is typing" indicator and invitations to group chat rooms. Although any valid XML can be included in a child element in an extended namespace, many common features have been standardized as Jabber Enhancement Proposals (JEPs).
Parameters:
  name - the element name.
Parameters:
  namespace - the element namespace. the first matching child element, or null if thereis no matching child element.




getSubject
public String getSubject()(Code)
Returns the subject of this message or null if there is no subject.. the subject.



getThread
public String getThread()(Code)
Returns the thread value of this message, an identifier that is used for tracking a conversation thread ("instant messaging session") between two entities. If the thread is not set, null will be returned. the thread value.



getType
public Type getType()(Code)
Returns the type of this message the message type.
See Also:   Type



setBody
public void setBody(String body)(Code)
Sets the body of this message.
Parameters:
  body - the body.



setSubject
public void setSubject(String subject)(Code)
Sets the subject of this message.
Parameters:
  subject - the subject.



setThread
public void setThread(String thread)(Code)
Sets the thread value of this message, an identifier that is used for tracking a conversation thread ("instant messaging session") between two entities.
Parameters:
  thread - thread value.



setType
public void setType(Type type)(Code)
Sets the type of this message.
Parameters:
  type - the message type.
See Also:   Type



Fields inherited from org.xmpp.packet.Packet
protected static DocumentFactory docFactory(Code)(Java Doc)
protected Element element(Code)(Java Doc)
protected JID fromJID(Code)(Java Doc)
protected JID toJID(Code)(Java Doc)

Methods inherited from org.xmpp.packet.Packet
public void addExtension(PacketExtension extension)(Code)(Java Doc)
abstract public Packet createCopy()(Code)(Java Doc)
public boolean deleteExtension(String name, String namespace)(Code)(Java Doc)
public Element getElement()(Code)(Java Doc)
public PacketError getError()(Code)(Java Doc)
public PacketExtension getExtension(String name, String namespace)(Code)(Java Doc)
public JID getFrom()(Code)(Java Doc)
public String getID()(Code)(Java Doc)
public JID getTo()(Code)(Java Doc)
public void setError(PacketError error)(Code)(Java Doc)
public void setError(PacketError.Condition condition)(Code)(Java Doc)
public void setFrom(String from)(Code)(Java Doc)
public void setFrom(JID from)(Code)(Java Doc)
public void setID(String ID)(Code)(Java Doc)
public void setTo(String to)(Code)(Java Doc)
public void setTo(JID to)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public String toXML()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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