Java Doc for ClientDocument.java in  » Ajax » ItsNat » org » itsnat » core » 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 » ItsNat » org.itsnat.core 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.itsnat.core.ClientDocument

All known Subclasses:   org.itsnat.impl.core.client.ClientDocumentImpl,
ClientDocument
public interface ClientDocument extends ItsNatUserData(Code)
Represents the browser's document/page. A browser's document may be a "normal" document (owner) or a remote view/control document (viewer).
See Also:   ItsNatDocument.getClientDocumentOwner
See Also:   ItsNatServletRequest.getClientDocument
author:
   Jose Maria Arranz Santamaria




Method Summary
public  voidaddCodeToSend(Object code)
     Add JavaScript code to send to the client (pending code).
public  voidaddCodeToSendListener(CodeToSendListener listener)
     Registers a new CodeToSendListener, this listener is called every time ClientDocument.addCodeToSend(Object) is called.
public  CometNotifiercreateCometNotifier()
     Creates a COMET notifier bound to this client and to the server document associated.
public  CometNotifiercreateCometNotifier(long ajaxTimeout)
     Creates a COMET notifier bound to this client and to the server document associated.
Parameters:
  ajaxTimeout - the timeout for the AJAX requests used to notify the client.
public  voiddisableSendCode()
     Disables the ClientDocument.addCodeToSend(Object) method, no new code can be added to send to the client.
public  booleandispatchEvent(EventTarget target, Event evt, int syncMode, long ajaxTimeout)
     Sends the specified event to the browser and waits until this event is dispatched calling dispatchEvent (FireFox) or fireEvent (MSIE) on the browser.
public  voidenableSendCode()
     Enables the ClientDocument.addCodeToSend(Object) method, new code can be added to send to the client.
public  DategetCreationDate()
     Returns the date when this object was created.
public  StringgetId()
     Returns the client identity.
public  ItsNatDocumentgetItsNatDocument()
     Returns the ItsNat document associated.
public  ItsNatSessiongetItsNatSession()
     Returns the parent ItsNat session.
public  booleanisSendCodeEnabled()
    
public  voidremoveCodeToSendListener(CodeToSendListener listener)
     Removes a previously registered CodeToSendListener.
public  voidstartEventDispatcherThread(Runnable task)
     Executes the specified task in a new thread, this code is ready to call EventTarget.dispatchEvent(Event) or ClientDocument.dispatchEvent(EventTarget,Event,int,long) many times.



Method Detail
addCodeToSend
public void addCodeToSend(Object code)(Code)
Add JavaScript code to send to the client (pending code). This code is removed and sent to the client as the return of the load process or any AJAX event.

Use this method exceptionally if only this client must receive the code, otherwise use ItsNatDocument.addCodeToSend(Object)


Parameters:
  code - the code to send, Object.toString() is called to convert to string.
See Also:   ClientDocument.isSendCodeEnabled()
See Also:   org.itsnat.core.script.ScriptUtil
throws:
  ItsNatException - if no code can be added.



addCodeToSendListener
public void addCodeToSendListener(CodeToSendListener listener)(Code)
Registers a new CodeToSendListener, this listener is called every time ClientDocument.addCodeToSend(Object) is called.
Parameters:
  listener - the new listener.
See Also:   ClientDocument.removeCodeToSendListener(CodeToSendListener)



createCometNotifier
public CometNotifier createCometNotifier()(Code)
Creates a COMET notifier bound to this client and to the server document associated.

Current implementation calls ClientDocument.createCometNotifier(long) with the default AJAX timeout returned by ItsNatDocument.getAJAXTimeout .

a new COMET notifier.



createCometNotifier
public CometNotifier createCometNotifier(long ajaxTimeout)(Code)
Creates a COMET notifier bound to this client and to the server document associated.
Parameters:
  ajaxTimeout - the timeout for the AJAX requests used to notify the client. If negative no timeout is defined. a new COMET notifier.



disableSendCode
public void disableSendCode()(Code)
Disables the ClientDocument.addCodeToSend(Object) method, no new code can be added to send to the client.
See Also:   ClientDocument.enableSendCode()



dispatchEvent
public boolean dispatchEvent(EventTarget target, Event evt, int syncMode, long ajaxTimeout) throws EventException(Code)
Sends the specified event to the browser and waits until this event is dispatched calling dispatchEvent (FireFox) or fireEvent (MSIE) on the browser. The call returns when the event is processed by the browser.

This method must not be called using a servlet-request thread. See the Reference Manual ("Events fired by the server" chapter) about requirements of the caller thread.

The syncMode parameter and ajaxTimeout are used to specify the synchronous mode and timeout of the internal event sent to the server to notify the client has already dispatched the event.


Parameters:
  target - the event target DOM object.
Parameters:
  evt - the DOM event to send to target.
Parameters:
  syncMode - synchronization mode.
Parameters:
  ajaxTimeout - the timeout of the AJAX event whether asynchronous. If negative no timeout is defined.
See Also:   ItsNatDocument.dispatchEvent(EventTargetEvent)
See Also:   ClientDocument.startEventDispatcherThread(Runnable code)



enableSendCode
public void enableSendCode()(Code)
Enables the ClientDocument.addCodeToSend(Object) method, new code can be added to send to the client.
See Also:   ClientDocument.disableSendCode()



getCreationDate
public Date getCreationDate()(Code)
Returns the date when this object was created. the creation date



getId
public String getId()(Code)
Returns the client identity. This value is unique per ItsNatSession and never reused in this context.

The identity value is unique no other session-identified object in the same session shares the same id.

Although this object is garbage collected, the identity value is never reused by another session-identified object in the same session.

the identity value.



getItsNatDocument
public ItsNatDocument getItsNatDocument()(Code)
Returns the ItsNat document associated. If this object is a viewer the document is not hold by a strong reference and may be null if it was destroyed (the observer browser page may outlive to the main/owner page, only the owner destroys the document). the ItsNat document, may be null if this client is a viewer.



getItsNatSession
public ItsNatSession getItsNatSession()(Code)
Returns the parent ItsNat session. If this object is a viewer the session may be different to the document owner session. the ItsNat session.



isSendCodeEnabled
public boolean isSendCodeEnabled()(Code)
Informs whether JavaScript code can be added to send to the client calling ClientDocument.addCodeToSend(Object) true if new code can be added.
See Also:   ClientDocument.disableSendCode()



removeCodeToSendListener
public void removeCodeToSendListener(CodeToSendListener listener)(Code)
Removes a previously registered CodeToSendListener.
Parameters:
  listener - the new listener.
See Also:   ClientDocument.addCodeToSendListener(CodeToSendListener)



startEventDispatcherThread
public void startEventDispatcherThread(Runnable task)(Code)
Executes the specified task in a new thread, this code is ready to call EventTarget.dispatchEvent(Event) or ClientDocument.dispatchEvent(EventTarget,Event,int,long) many times.

Use the thread created by this method to send events fired in the server to the browser simulating user actions.

This method must be called using a servlet-request thread.


Parameters:
  task - the task to execute.



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