Java Doc for Registry.java in  » Scripting » oscript-2.10.4 » ti » chimera » 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 » Scripting » oscript 2.10.4 » ti.chimera 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   ti.chimera.registry.RegistryCore
      ti.chimera.Registry

Registry
public class Registry extends RegistryCore (Code)
The registry is a mechanism that allows different parts of the system share data. It is traditionally used to store registered plugins and services, but other parts of the system can use the registry to store or share data. The registry uses a publish-subscribe model, where in order to track the value of a node, the user subscribes to the node, and whenever the value of the node changes the most recent value is published to the subscriber's callback function. The registry will ensure that changes are published in the order they occur, and that all changes will be published, even if they've already been super- ceded by subsequent changes.

The registry is organized as a hierarchical tree, where "nodes" are either parent nodes (directories) or data nodes. Directory nodes are just data nodes whose data is a table mapping child names to nodes. A path is a / delimited string that specifies how to find a node from the root of the tree. Paths can contain .. to refer to one level up in the tree, or . to refer to the current level in the tree.

The registry can be accessed via ti.chimera.Main.getRegistry or from the script environment variable registry.
author:
   Rob Clark
version:
   0.1
See Also:   ti.chimera.Main.getRegistry


Inner Class :abstract class NodeSeeker


Constructor Summary
 Registry(Main main)
     Class Constructor.

Method Summary
public  ServicegetService(String name)
     Get service provided by a plugin by name.
public  voidregister(Plugin plugin)
     Register a plugin.
public  voidsubscribeToCreation(String path, NodeCreationSubscriber subscriber)
     Subscribe to the creation of a node.
public  voidsubscribeToDeletion(String path, NodeDeletionSubscriber subscriber)
     Subscribe to the deletion of a node.
public  voidsubscribeToValue(String path, NodeContract contract, NodeSubscriber subscriber)
     Subscribe to receive notification of changes to the value of the node at the specified path.
public  voidunsubscribeFromCreation(NodeCreationSubscriber subscriber)
     Unsubscribe to the creation of a node.
public  voidunsubscribeFromDeletion(NodeDeletionSubscriber subscriber)
     Unsubscribe to the deletion of a node.
public  voidunsubscribeFromValue(NodeSubscriber subscriber)
     Unsubscribe from specified path.


Constructor Detail
Registry
Registry(Main main)(Code)
Class Constructor.




Method Detail
getService
public Service getService(String name)(Code)
Get service provided by a plugin by name. This will automatically start the plugin providing the service if it has not already been started.
Parameters:
  name - the name of the plugin to find
See Also:   Registry.getServiceNames



register
public void register(Plugin plugin)(Code)
Register a plugin. This is how a plugin is added to the system. Once a plugin is added, the plugin can be resolved by Registry.getPlugin and a service provided by a plugin can be resolved by Registry.getService . The registry will handle starting a plugin if needed.
Parameters:
  plugin - the plugin to register
See Also:   Registry.getPlugin
See Also:   Registry.getService



subscribeToCreation
public void subscribeToCreation(String path, NodeCreationSubscriber subscriber)(Code)
Subscribe to the creation of a node. The subscriber will be called whenever a node is Registry.link ed in to the specified path. If the node already exists, the subscriber will be called (pretty much) immediately.
Parameters:
  path - the path to the node to subscribe to
Parameters:
  subscriber - the subscriber



subscribeToDeletion
public void subscribeToDeletion(String path, NodeDeletionSubscriber subscriber)(Code)
Subscribe to the deletion of a node. The subscriber will be called whenever a node is Registry.unlink ed from the specified path.
Parameters:
  path - the path to the node to subscribe to
Parameters:
  subscriber - the subscriber



subscribeToValue
public void subscribeToValue(String path, NodeContract contract, NodeSubscriber subscriber)(Code)
Subscribe to receive notification of changes to the value of the node at the specified path. This subscription is relative to the specified path, and not the node that is currently located at that path. If there is currently a node at this path, then the subscriber will be immediately called with the current value, otherwise the subscriber will be called once the node is created. If the node at this path is removed, and then at some later time another node is Registry.link ed in to this path, then the subscriber will subscribed to that node (and immediately called with it's value), and so on.

If contract is not null, then only subscribe to the node if it has a compatible contract.
Parameters:
  path - the path to the node to subscribe to
Parameters:
  contract - the optional contract, or null
Parameters:
  subscriber - the subscriber




unsubscribeFromCreation
public void unsubscribeFromCreation(NodeCreationSubscriber subscriber)(Code)
Unsubscribe to the creation of a node. If not subscribed, do nothing.
Parameters:
  subscriber - the subscriber



unsubscribeFromDeletion
public void unsubscribeFromDeletion(NodeDeletionSubscriber subscriber)(Code)
Unsubscribe to the deletion of a node. If not subscribed, do nothing.
Parameters:
  subscriber - the subscriber



unsubscribeFromValue
public void unsubscribeFromValue(NodeSubscriber subscriber)(Code)
Unsubscribe from specified path. If not subscribed, do nothing.
Parameters:
  subscriber - the subscriber



Fields inherited from ti.chimera.registry.RegistryCore
protected Main main(Code)(Java Doc)
final protected Node root(Code)(Java Doc)

Methods inherited from ti.chimera.registry.RegistryCore
public static String basename(String path)(Code)(Java Doc)
public static String dirname(String path)(Code)(Java Doc)
public boolean exists(String path)(Code)(Java Doc)
public void link(Node node, String path) throws RegistryException(Code)(Java Doc)
public Node mkdir(String path)(Code)(Java Doc)
public static String normalize(String path)(Code)(Java Doc)
public Node resolve(String path) throws RegistryException(Code)(Java Doc)
public void unlink(String path) throws RegistryException(Code)(Java Doc)
public void unlink(String path, boolean recursive) throws RegistryException(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.