Java Doc for ObservationManager.java in  » 6.0-JDK-Modules » jsr-283 » javax » jcr » observation » 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 » jsr 283 » javax.jcr.observation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.jcr.observation.ObservationManager

ObservationManager
public interface ObservationManager (Code)
The ObservationManager object.

Acquired via javax.jcr.Workspace.getObservationManager . Allows for the registration and deregistration of event listeners.





Method Summary
public  voidaddEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal)
     Adds an event listener that listens for the specified eventTypes (a combination of one or more event types encoded as a bit mask value).

The set of events will be further filtered by the access rights of the current Session as well as the restrictions specified by the parameters of this method.

public  EventListenerIteratorgetRegisteredEventListeners()
     Returns all event listeners that have been registered through this session.
public  voidremoveEventListener(EventListener listener)
     Deregisters an event listener.

A listener may be deregistered while it is being executed.

public  voidsetUserData(String userData)
     Sets the user data information that will be returned by Event.getUserData .



Method Detail
addEventListener
public void addEventListener(EventListener listener, int eventTypes, String absPath, boolean isDeep, String[] uuid, String[] nodeTypeName, boolean noLocal) throws RepositoryException(Code)
Adds an event listener that listens for the specified eventTypes (a combination of one or more event types encoded as a bit mask value).

The set of events will be further filtered by the access rights of the current Session as well as the restrictions specified by the parameters of this method. These restrictions are stated in terms of characteristics of the associated parent node of the event.

The associated parent node of an event is the parent node of the item at (or formerly at) the path returned by Event.getPath . The following restrictions are available:

  • absPath, isDeep: Only events whose associated parent node is at absPath (or within its subtree, if isDeep is true) will be received. It is permissible to register a listener for a path where no node currently exists.
  • uuid: Only events whose associated parent node has one of the identifiers in this list will be received. If his parameter is null then no identifier-related restriction is placed on events received. Note that specifying an empty array instead of null would result in no nodes being listened to. The term "UUID" is used for compatibility with JCR 1.0.
  • nodeTypeName: Only events whose associated parent node has one of the node types (or a subtype of one of the node types) in this list will be received. If his parameter is null then no node type-related restriction is placed on events received. Note that specifying an empty array instead of null would result in no nodes types being listened to.
The restrictions are "ANDed" together. In other words, for a particular node to be "listened to" it must meet all the restrictions.

Additionally, if noLocal is true, then events generated by the session through which the listener was registered are ignored. Otherwise, they are not ignored.

The filters of an already-registered EventListener can be changed at runtime by re-registering the same EventListener object (i.e. the same actual Java object) with a new set of filter arguments. The implementation must ensure that no events are lost during the changeover.

In addition to the filters placed on a listener above, the scope of observation support, in terms of which subtrees are observable, may also be subject to implementation-specific restrictions. For example, in some repositories observation of changes in the jcr:system subtree may not be supported
Parameters:
  listener - an EventListener object.
Parameters:
  eventTypes - A combination of one or more event type constants encoded as a bitmask.
Parameters:
  absPath - an absolute path.
Parameters:
  isDeep - a boolean.
Parameters:
  uuid - array of identifiers.
Parameters:
  nodeTypeName - array of node type names.
Parameters:
  noLocal - a boolean.
throws:
  RepositoryException - If an error occurs.




getRegisteredEventListeners
public EventListenerIterator getRegisteredEventListeners() throws RepositoryException(Code)
Returns all event listeners that have been registered through this session. If no listeners have been registered, an empty iterator is returned. an EventListenerIterator.
throws:
  RepositoryException - If an error occurs



removeEventListener
public void removeEventListener(EventListener listener) throws RepositoryException(Code)
Deregisters an event listener.

A listener may be deregistered while it is being executed. The deregistration method will block until the listener has completed executing. An exception to this rule is a listener which deregisters itself from within the onEvent method. In this case, the deregistration method returns immediately, but deregistration will effectively be delayed until the listener completes.
Parameters:
  listener - The listener to deregister.
throws:
  RepositoryException - If an error occurs.




setUserData
public void setUserData(String userData) throws RepositoryException(Code)
Sets the user data information that will be returned by Event.getUserData .
Parameters:
  userData -
throws:
  RepositoryException -



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