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


java.lang.Object
   org.jivesoftware.openfire.pubsub.PubSubEngine

PubSubEngine
public class PubSubEngine (Code)
A PubSubEngine is responsible for handling packets sent to a pub-sub service.
author:
   Matt Tucker



Constructor Summary
public  PubSubEngine(PacketRouter router)
    

Method Summary
 voidcancelQueuedItems(PubSubService service, Collection<PublishedItem> items)
     Cancels any queued operation for the specified list of items.
public static  Collection<String>getShowPresences(PubSubService service, JID subscriber)
     Returns the show values of the last know presence of all connected resources of the specified subscriber.
public static  voidpresenceSubscriptionNotRequired(PubSubService service, Node node, JID user)
     Requests the pubsub service to subscribe to the presence of the user.
public static  voidpresenceSubscriptionRequired(PubSubService service, Node node, JID user)
     Requests the pubsub service to unsubscribe from the presence of the user.
public  booleanprocess(PubSubService service, IQ iq)
     Handles IQ packets sent to the pubsub service.
public  voidprocess(PubSubService service, Presence presence)
     Handles Presence packets sent to the pubsub service.
public  voidprocess(PubSubService service, Message message)
     Handles Message packets sent to the pubsub service.
public static  voidqueueItemToAdd(PubSubService service, PublishedItem newItem)
     Adds the item to the queue of items to add to the database.
public static  voidqueueItemToRemove(PubSubService service, PublishedItem removedItem)
     Adds the item to the queue of items to remove from the database.
 voidsendErrorPacket(IQ packet, PacketError.Condition error, Element pubsubError)
     Generate a conflict packet to indicate that the nickname being requested/used is already in use by another user.
 voidsetPublishedItemTaskTimeout(PubSubService service, int timeout)
     Schedules the maintenance task for repeated fixed-delay execution, beginning after the specified delay.
public  voidshutdown(PubSubService service)
    
public  voidstart(PubSubService service)
    


Constructor Detail
PubSubEngine
public PubSubEngine(PacketRouter router)(Code)




Method Detail
cancelQueuedItems
void cancelQueuedItems(PubSubService service, Collection<PublishedItem> items)(Code)
Cancels any queued operation for the specified list of items. This operation is usually required when a node was deleted so any pending operation of the node items should be cancelled.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  items - the list of items to remove the from queues.



getShowPresences
public static Collection<String> getShowPresences(PubSubService service, JID subscriber)(Code)
Returns the show values of the last know presence of all connected resources of the specified subscriber. When the subscriber JID is a bare JID then the answered collection will have many entries one for each connected resource. Moreover, if the user is offline then an empty collectin is returned. Available show status is represented by a online value. The rest of the possible show values as defined in RFC 3921.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  subscriber - the JID of the subscriber. This is not the JID of the affiliate. an empty collection when offline. Otherwise, a collection with the show valueof each connected resource.



presenceSubscriptionNotRequired
public static void presenceSubscriptionNotRequired(PubSubService service, Node node, JID user)(Code)
Requests the pubsub service to subscribe to the presence of the user. If the service has already subscribed to the user's presence then do nothing.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  node - the node that originated the subscription request.
Parameters:
  user - the JID of the affiliate to subscribe to his presence.



presenceSubscriptionRequired
public static void presenceSubscriptionRequired(PubSubService service, Node node, JID user)(Code)
Requests the pubsub service to unsubscribe from the presence of the user. If the service was not subscribed to the user's presence or any node still requires to be subscribed to the user presence then do nothing.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  node - the node that originated the unsubscription request.
Parameters:
  user - the JID of the affiliate to unsubscribe from his presence.



process
public boolean process(PubSubService service, IQ iq)(Code)
Handles IQ packets sent to the pubsub service. Requests of disco#info and disco#items are not being handled by the engine. Instead the service itself should handle disco packets.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  iq - the IQ packet sent to the pubsub service. true if the IQ packet was handled by the engine.



process
public void process(PubSubService service, Presence presence)(Code)
Handles Presence packets sent to the pubsub service. Only process available and not available presences.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  presence - the Presence packet sent to the pubsub service.



process
public void process(PubSubService service, Message message)(Code)
Handles Message packets sent to the pubsub service. Messages may be of type error when an event notification was sent to a susbcriber whose address is no longer available.

Answers to authorization requests sent to node owners to approve pending subscriptions will also be processed by this method.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  message - the Message packet sent to the pubsub service.




queueItemToAdd
public static void queueItemToAdd(PubSubService service, PublishedItem newItem)(Code)
Adds the item to the queue of items to add to the database. The queue is going to be processed by another thread.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  newItem - the item to add to the database.



queueItemToRemove
public static void queueItemToRemove(PubSubService service, PublishedItem removedItem)(Code)
Adds the item to the queue of items to remove from the database. The queue is going to be processed by another thread.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  removedItem - the item to remove from the database.



sendErrorPacket
void sendErrorPacket(IQ packet, PacketError.Condition error, Element pubsubError)(Code)
Generate a conflict packet to indicate that the nickname being requested/used is already in use by another user.
Parameters:
  packet - the packet to be bounced.



setPublishedItemTaskTimeout
void setPublishedItemTaskTimeout(PubSubService service, int timeout)(Code)
Schedules the maintenance task for repeated fixed-delay execution, beginning after the specified delay. Subsequent executions take place at approximately regular intervals separated by the specified period.
Parameters:
  service - the PubSub service this action is to be performed for.
Parameters:
  timeout - the new frequency of the maintenance task.



shutdown
public void shutdown(PubSubService service)(Code)



start
public void start(PubSubService service)(Code)



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.