Java Doc for Cache.java in  » Ajax » dwr » jsx3 » app » 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 » Ajax » dwr » jsx3.app 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.directwebremoting.proxy.io.Context
      jsx3.lang.Object
         jsx3.app.Cache

Cache
public class Cache extends jsx3.lang.Object (Code)
Provides cached access to XML and XSL data. Events Cache instances publish two types of events for every operation that modifies the contents of the cache. The schemas of the two event types are subject - Cache.CHANGE id or ids - the ID or array of IDs of the modified documents action - Cache.ADD, Cache.CHANGE or Cache.REMOVE and subject - the cache ID of the modified document action - Cache.ADD, Cache.CHANGE or Cache.REMOVE Asynchronous Loading Cache documents can be loaded asychronously with the getOrOpenAsync() method. This method returns the corresponding document synchronously if it already exists in the cache. If the document does not exist in the cache, then it is loaded asynchronously and the method returns a placeholder document. The namespace URI of this placeholder document is Cache.XSDNS and its root node name is "loading". Since the cache stores this placeholder document until the document finishes loading, subsequent calls to synchronous APIs (getDocument(), getOrOpenDocument(), etc) may also return the placeholder document. It is therefore important to check the namespace of the returned document when any code uses the asynchronous APIs. Once a document finishes loading asynchronously the placeholder document is replaced with the loaded document. This change in value causes the cache to publish a pair of events of action Cache.CHANGE. If loading the document fails or times out the placeholder document is instead replaced with another placeholder document. This document also has a URI namespace of Cache.XSDNS. Its root node name may be either "error" or "timeout". If the root node name is "error" then the root node has an attribute, also named "error", which contains the XML error message.
author:
   Joe Walker [joe at getahead dot org]
author:
   DRAPGEN - Dwr Reverse Ajax Proxy GENerator


Field Summary
final public static  StringADD
     Event action.
final public static  intASYNC_TIMEOUT
     The number of milliseconds before asynchronous document loads time out.
final public static  StringCHANGE
     Event subject and action.
final public static  StringREMOVE
     Event action.
final public static  StringXSDNS
    

Constructor Summary
public  Cache(Context context, String extension, ScriptProxy scriptProxy)
    
public  Cache()
     Creates a new instance of this class.

Method Summary
public  jsx3.xml.CdfDocumentclearById(String strId)
     Removes the document stored in this cache under id strId.
public  TclearById(String strId, Class<T> returnType)
     Removes the document stored in this cache under id strId.
public  voidclearByTimestamp(java.util.Date intTimestamp, org.directwebremoting.proxy.Callback<Object[]> callback)
     Removes all documents placed in this cache before intTimestamp.
public  voidclearByTimestamp(int intTimestamp, org.directwebremoting.proxy.Callback<Object[]> callback)
     Removes all documents placed in this cache before intTimestamp.
public  voiddestroy()
     Removes all references to documents contained in this cache.
public  jsx3.xml.CdfDocumentgetDocument(String strId)
     Returns the document stored in this cache under id strId.
public  TgetDocument(String strId, Class<T> returnType)
     Returns the document stored in this cache under id strId.
public  jsx3.xml.CdfDocumentgetOrOpenAsync(String strURL, String strId, Class objClass)
     Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  TgetOrOpenAsync(String strURL, String strId, Class objClass, Class<T> returnType)
     Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  jsx3.xml.CdfDocumentgetOrOpenAsync(java.net.URI strURL, String strId, Class objClass)
     Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  TgetOrOpenAsync(java.net.URI strURL, String strId, Class objClass, Class<T> returnType)
     Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  jsx3.xml.CdfDocumentgetOrOpenDocument(String strURL, String strId, Class objClass)
     Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored.
public  TgetOrOpenDocument(String strURL, String strId, Class objClass, Class<T> returnType)
     Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored.
public  jsx3.xml.CdfDocumentgetOrOpenDocument(java.net.URI strURL, String strId, Class objClass)
     Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored.
public  TgetOrOpenDocument(java.net.URI strURL, String strId, Class objClass, Class<T> returnType)
     Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored.
public  voidgetTimestamp(String strId, org.directwebremoting.proxy.Callback<Integer> callback)
     Returns the timestamp from when the document stored under id strId was stored in this cache.
public  voidkeys(org.directwebremoting.proxy.Callback<Object[]> callback)
     Returns a list of all the keys in this cache instance.
public  jsx3.xml.CdfDocumentopenDocument(String strURL, String strId, Class objClass)
     Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  TopenDocument(String strURL, String strId, Class objClass, Class<T> returnType)
     Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  jsx3.xml.CdfDocumentopenDocument(java.net.URI strURL, String strId, Class objClass)
     Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  TopenDocument(java.net.URI strURL, String strId, Class objClass, Class<T> returnType)
     Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document.
public  voidpublish(jsx3.lang.Object objEvent, org.directwebremoting.proxy.Callback<Integer> callback)
     Publishes an event to all subscribed objects.
public  voidsetDocument(String strId, jsx3.xml.CdfDocument objDocument)
     Stores the document objDocument in this cache under id strId.
public  voidsubscribe(String strEventId, jsx3.lang.Object objHandler, String objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(Object[] strEventId, jsx3.lang.Object objHandler, String objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(Object[] strEventId, String objHandler, String objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(String strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(Object[] strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(String strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(Object[] strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidsubscribe(String strEventId, String objHandler, String objFunction)
     Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance.
public  voidunsubscribe(String strEventId, String objHandler)
     Unsubscribe an object or function from an event published by this object.
public  voidunsubscribe(Object[] strEventId, jsx3.lang.Object objHandler)
     Unsubscribe an object or function from an event published by this object.
public  voidunsubscribe(Object[] strEventId, String objHandler)
     Unsubscribe an object or function from an event published by this object.
public  voidunsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler)
     Unsubscribe an object or function from an event published by this object.
public  voidunsubscribe(String strEventId, jsx3.lang.Object objHandler)
     Unsubscribe an object or function from an event published by this object.
public  voidunsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler)
     Unsubscribe an object or function from an event published by this object.
public  voidunsubscribeAll(String strEventId)
     Unsubscribes all subscribed objects to a type of event published by this object.

Field Detail
ADD
final public static String ADD(Code)
Event action.



ASYNC_TIMEOUT
final public static int ASYNC_TIMEOUT(Code)
The number of milliseconds before asynchronous document loads time out.



CHANGE
final public static String CHANGE(Code)
Event subject and action.



REMOVE
final public static String REMOVE(Code)
Event action.



XSDNS
final public static String XSDNS(Code)




Constructor Detail
Cache
public Cache(Context context, String extension, ScriptProxy scriptProxy)(Code)
All reverse ajax proxies need context to work from
Parameters:
  scriptProxy - The place we are writing scripts to
Parameters:
  context - The script that got us to where we are now



Cache
public Cache()(Code)
Creates a new instance of this class.




Method Detail
clearById
public jsx3.xml.CdfDocument clearById(String strId)(Code)
Removes the document stored in this cache under id strId.
Parameters:
  strId - the remove document, if any.



clearById
public T clearById(String strId, Class<T> returnType)(Code)
Removes the document stored in this cache under id strId.
Parameters:
  strId -
Parameters:
  returnType - The expected return type the remove document, if any.



clearByTimestamp
public void clearByTimestamp(java.util.Date intTimestamp, org.directwebremoting.proxy.Callback<Object[]> callback)(Code)
Removes all documents placed in this cache before intTimestamp.
Parameters:
  intTimestamp - epoch seconds or a date object.
Parameters:
  callback - the ids of the removed documents.



clearByTimestamp
public void clearByTimestamp(int intTimestamp, org.directwebremoting.proxy.Callback<Object[]> callback)(Code)
Removes all documents placed in this cache before intTimestamp.
Parameters:
  intTimestamp - epoch seconds or a date object.
Parameters:
  callback - the ids of the removed documents.



destroy
public void destroy()(Code)
Removes all references to documents contained in this cache. This cache is no longer usable after calling this method.



getDocument
public jsx3.xml.CdfDocument getDocument(String strId)(Code)
Returns the document stored in this cache under id strId.
Parameters:
  strId - the stored document or null if none exists.



getDocument
public T getDocument(String strId, Class<T> returnType)(Code)
Returns the document stored in this cache under id strId.
Parameters:
  strId -
Parameters:
  returnType - The expected return type the stored document or null if none exists.



getOrOpenAsync
public jsx3.xml.CdfDocument getOrOpenAsync(String strURL, String strId, Class objClass)(Code)
Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance. the document retrieved from the cache or a placeholder document if the documentis in the process of loading asynchronously.



getOrOpenAsync
public T getOrOpenAsync(String strURL, String strId, Class objClass, Class<T> returnType)(Code)
Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance.
Parameters:
  returnType - The expected return type the document retrieved from the cache or a placeholder document if the documentis in the process of loading asynchronously.



getOrOpenAsync
public jsx3.xml.CdfDocument getOrOpenAsync(java.net.URI strURL, String strId, Class objClass)(Code)
Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance. the document retrieved from the cache or a placeholder document if the documentis in the process of loading asynchronously.



getOrOpenAsync
public T getOrOpenAsync(java.net.URI strURL, String strId, Class objClass, Class<T> returnType)(Code)
Asynchronously loads an xml document and stores it in this cache.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance.
Parameters:
  returnType - The expected return type the document retrieved from the cache or a placeholder document if the documentis in the process of loading asynchronously.



getOrOpenDocument
public jsx3.xml.CdfDocument getOrOpenDocument(String strURL, String strId, Class objClass)(Code)
Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance if a new document is opened. the document retrieved from the cache or loaded.



getOrOpenDocument
public T getOrOpenDocument(String strURL, String strId, Class objClass, Class<T> returnType)(Code)
Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance if a new document is opened.
Parameters:
  returnType - The expected return type the document retrieved from the cache or loaded.



getOrOpenDocument
public jsx3.xml.CdfDocument getOrOpenDocument(java.net.URI strURL, String strId, Class objClass)(Code)
Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance if a new document is opened. the document retrieved from the cache or loaded.



getOrOpenDocument
public T getOrOpenDocument(java.net.URI strURL, String strId, Class objClass, Class<T> returnType)(Code)
Retrieves a document from this cache or, if this cache contains no such document, loads the document synchronously and returns it.
Parameters:
  strURL - the URI of the document.
Parameters:
  strId - the id under which the document is/will be stored. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance if a new document is opened.
Parameters:
  returnType - The expected return type the document retrieved from the cache or loaded.



getTimestamp
public void getTimestamp(String strId, org.directwebremoting.proxy.Callback<Integer> callback)(Code)
Returns the timestamp from when the document stored under id strId was stored in this cache.
Parameters:
  strId - the id under which the document is stored.
Parameters:
  callback - the timestamp as an integer (epoch seconds) or null if no such document existsin this cache.



keys
public void keys(org.directwebremoting.proxy.Callback<Object[]> callback)(Code)
Returns a list of all the keys in this cache instance.



openDocument
public jsx3.xml.CdfDocument openDocument(String strURL, String strId, Class objClass)(Code)
Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance. the loaded document object.



openDocument
public T openDocument(String strURL, String strId, Class objClass, Class<T> returnType)(Code)
Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance.
Parameters:
  returnType - The expected return type the loaded document object.



openDocument
public jsx3.xml.CdfDocument openDocument(java.net.URI strURL, String strId, Class objClass)(Code)
Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance. the loaded document object.



openDocument
public T openDocument(java.net.URI strURL, String strId, Class objClass, Class<T> returnType)(Code)
Synchronously loads an xml document, stores it in this cache, and returns the loaded document.
Parameters:
  strURL - url (relative or absolute) the URI of the document to open.
Parameters:
  strId - the id under which to store the document. If this parameter is not provided, thestrURL parameter is used as the id.
Parameters:
  objClass - jsx3.xml.Document (default value) or one of its subclasses. Theclass with which to instantiate the new document instance.
Parameters:
  returnType - The expected return type the loaded document object.



publish
public void publish(jsx3.lang.Object objEvent, org.directwebremoting.proxy.Callback<Integer> callback)(Code)
Publishes an event to all subscribed objects.
Parameters:
  objEvent - the event, should have at least a field 'subject' that is the event id, another common field is 'target' (target will default to this instance)
Parameters:
  callback - the number of listeners to which the event was broadcast



setDocument
public void setDocument(String strId, jsx3.xml.CdfDocument objDocument)(Code)
Stores the document objDocument in this cache under id strId. If a document already exists in this cache under strId then that document is removed from the cache.
Parameters:
  strId - the id under which to store objDocument.
Parameters:
  objDocument -



subscribe
public void subscribe(String strEventId, jsx3.lang.Object objHandler, String objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(Object[] strEventId, jsx3.lang.Object objHandler, String objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(Object[] strEventId, String objHandler, String objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(String strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(Object[] strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(String strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(Object[] strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



subscribe
public void subscribe(String strEventId, String objHandler, String objFunction)(Code)
Subscribes an object or function to a type of event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored)
Parameters:
  objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance



unsubscribe
public void unsubscribe(String strEventId, String objHandler)(Code)
Unsubscribe an object or function from an event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - the value of objHandler passed to subscribe



unsubscribe
public void unsubscribe(Object[] strEventId, jsx3.lang.Object objHandler)(Code)
Unsubscribe an object or function from an event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - the value of objHandler passed to subscribe



unsubscribe
public void unsubscribe(Object[] strEventId, String objHandler)(Code)
Unsubscribe an object or function from an event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - the value of objHandler passed to subscribe



unsubscribe
public void unsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler)(Code)
Unsubscribe an object or function from an event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - the value of objHandler passed to subscribe



unsubscribe
public void unsubscribe(String strEventId, jsx3.lang.Object objHandler)(Code)
Unsubscribe an object or function from an event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - the value of objHandler passed to subscribe



unsubscribe
public void unsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler)(Code)
Unsubscribe an object or function from an event published by this object. As of version 3.4 a string value for objHandler is deprecated.
Parameters:
  strEventId - the event type(s).
Parameters:
  objHandler - the value of objHandler passed to subscribe



unsubscribeAll
public void unsubscribeAll(String strEventId)(Code)
Unsubscribes all subscribed objects to a type of event published by this object.
Parameters:
  strEventId - the event type



Methods inherited from jsx3.lang.Object
public void ignoreReturn()(Code)(Java Doc)

Methods inherited from org.directwebremoting.proxy.io.Context
protected String getContextPath()(Code)(Java Doc)
protected ScriptBuffer getInitScript()(Code)(Java Doc)
protected ScriptProxy getScriptProxy()(Code)(Java Doc)
protected void setInitScript(ScriptBuffer initScript)(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.