Java Doc for Presence.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.Presence

All known Subclasses:   org.xmpp.muc.LeaveRoom,  org.xmpp.muc.JoinRoom,
Presence
public class Presence extends Packet (Code)
Presence packet. Presence packets are used to express an entity's current network availability and to notify other entities of that availability. Presence packets are also used to negotiate and manage subscriptions to the presence of other entities.

A presence optionally has a Type .
author:
   Matt Tucker


Inner Class :public enum Type
Inner Class :public enum Show


Constructor Summary
public  Presence()
     Constructs a new Presence.
public  Presence(Presence.Type type)
     Constructs a new Presence with the specified type.
public  Presence(Element element)
     Constructs a new Presence using an existing Element.
public  Presence(Element element, boolean skipValidation)
     Constructs a new Presence 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  PresencecreateCopy()
     Returns a deep copy of this Presence.
public  ElementgetChildElement(String name, String namespace)
     Returns the first child element of this packet that matches the given name and namespace.
public  intgetPriority()
     Returns the priority.
public  ShowgetShow()
     Returns the presence "show" value, which specifies a particular availability status.
public  StringgetStatus()
     Returns the status of this presence packet, a natural-language description of availability status.
public  TypegetType()
     Returns the type of this presence.
public  booleanisAvailable()
     Returns true if the presence type is "available".
public  voidsetPriority(int priority)
     Sets the priority.
public  voidsetShow(Show show)
     Sets the presence "show" value, which specifies a particular availability status.
public  voidsetStatus(String status)
     Sets the status of this presence packet, a natural-language description of availability status.
public  voidsetType(Type type)
     Sets the type of this presence.


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



Presence
public Presence(Presence.Type type)(Code)
Constructs a new Presence with the specified type.
Parameters:
  type - the presence type.



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



Presence
public Presence(Element element, boolean skipValidation)(Code)
Constructs a new Presence using an existing Element. This is useful for parsing incoming Presence Elements into Presence 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 Presence 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 Presence createCopy()(Code)
Returns a deep copy of this Presence. a deep copy of this Presence.



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.




getPriority
public int getPriority()(Code)
Returns the priority. The valid priority range is -128 through 128. If no priority element exists in the packet, this method will return the default value of 0. the priority.



getShow
public Show getShow()(Code)
Returns the presence "show" value, which specifies a particular availability status. If the <show> element is not present, this method will return null. The show value can only be set if the presence type is "avaialble". A null show value is used to represent "available", which is the default. the presence show value..
See Also:   Show



getStatus
public String getStatus()(Code)
Returns the status of this presence packet, a natural-language description of availability status. the status.



getType
public Type getType()(Code)
Returns the type of this presence. If the presence is "available", the type will be null (in XMPP, no value for the type attribute is defined as available). the presence type or null if "available".
See Also:   Type



isAvailable
public boolean isAvailable()(Code)
Returns true if the presence type is "available". This is a convenience method that is equivalent to:
getType() == null



setPriority
public void setPriority(int priority)(Code)
Sets the priority. The valid priority range is -128 through 128.
Parameters:
  priority - the priority.
throws:
  IllegalArgumentException - if the priority is less than -128 or greaterthan 128.



setShow
public void setShow(Show show)(Code)
Sets the presence "show" value, which specifies a particular availability status. The show value can only be set if the presence type is "available". A null show value is used to represent "available", which is the default.
Parameters:
  show - the presence show value.
throws:
  IllegalArgumentException - if the presence type is not available.
See Also:   Show



setStatus
public void setStatus(String status)(Code)
Sets the status of this presence packet, a natural-language description of availability status.
Parameters:
  status - the status.



setType
public void setType(Type type)(Code)
Sets the type of this presence.
Parameters:
  type - the presence 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.