Java Doc for TreeView.java in  » Groupware » Data-share » org » datashare » 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 » Groupware » Data share » org.datashare 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.datashare.TreeView

TreeView
public class TreeView (Code)
This class is run on the server and is responsible for maintaining our tree view of clients and sessions/channels/consumers, and for issuing UpdateAvailableMsg objects to clients indicating changes in our tree view. It makes calls back to the server when events warrent (such as a new client has joined so the server is told about it so an UpdateAvailable object can be sent to all registered listeners.
author:
   Charles Wood
version:
   1.0


Field Summary
 HashtableoldSessionsTable
    
 TreeViewServerInterfaceserver
    

Constructor Summary
public  TreeView(TreeViewServerInterface server)
    

Method Summary
public  voidaddChannel(ChannelInfo channelInfo)
    
public  voidaddConsumer(ConsumerInfo consumerInfo)
    
public  voidaddSession(SessionInfo sessionInfo)
    
public  voidaddSpecialClient(ClientInfo clientInfo)
    
public  booleanaddTreeListener(ClientInfo clientInfo, SocketAdapter ts)
     calling this method will register the caller so that any subsequent tree updates will be sent to the specified TreeViewListenerInterface.
 DefaultMutableTreeNodegetExternalArchivedNode()
    
public  DefaultMutableTreeNodegetExternalTreeNode(ClientInfo clientInfo)
    
public  DefaultMutableTreeNodegetTreeNode()
    
public  voidremoveChannel(ChannelInfo channelInfo)
    
public  voidremoveConsumer(ConsumerInfo consumerInfo)
    
public  voidremoveSession(SessionInfo sessionInfo)
    
public  voidremoveSpecialClient(ClientInfo clientInfo)
    
public  booleanremoveTreeListener(SocketAdapter ts)
    
public  voidupdateAvailable(UpdateAvailableMsg msg, boolean adminOnly)
     Uses the commandStatus connection on the server to issue objects to clients who have become TreeViewListeners, mainly used to send UpdateAvailableMsg objects, but can send any datashare.object object.

Field Detail
oldSessionsTable
Hashtable oldSessionsTable(Code)



server
TreeViewServerInterface server(Code)
a reference to the server instance that created this instance




Constructor Detail
TreeView
public TreeView(TreeViewServerInterface server)(Code)
Constructor, performs no initialization
Parameters:
  server - the server instance that created this instance




Method Detail
addChannel
public void addChannel(ChannelInfo channelInfo)(Code)
adds the specified Channel to the parent Session and notifies listeners



addConsumer
public void addConsumer(ConsumerInfo consumerInfo)(Code)
adds the specified Consumer to the specified Channel of the specified Session and notifies listeners



addSession
public void addSession(SessionInfo sessionInfo)(Code)
adds the specified Session to the sessionNodes and notifies listeners



addSpecialClient
public void addSpecialClient(ClientInfo clientInfo)(Code)
adds the specified Client to the ClientNodes and notifies listeners



addTreeListener
public boolean addTreeListener(ClientInfo clientInfo, SocketAdapter ts)(Code)
calling this method will register the caller so that any subsequent tree updates will be sent to the specified TreeViewListenerInterface. Note that for now, a client may receive only their own class of sessions/clients updates, or all updates.
Parameters:
  clientInfo - the client of the commandStatus connection to be usedfor the update objects, must be previously registered with server.
Parameters:
  ts - the socket that is to be used when sending TreeView datashareobjects, shouldcorrespond to a commandStatus connection on a client.Some of what is going on in this class might be better handled by a database,but we really don't want to force a user to have access to a database...and thefunctioning of this method is important.Note that clients should only be in treeViewListeners or treeViewAllListeners, not both.If a client is added to one, this method will remove them from the other.The type of clientClass that the client will be notified of will be only their ownclientClass, unless their ClientInfo has the seeAllTreeObjects flag set.



getExternalArchivedNode
DefaultMutableTreeNode getExternalArchivedNode()(Code)
Creates a node that show all the archived Sessions on the server, suitable for Serialization (for external use)



getExternalTreeNode
public DefaultMutableTreeNode getExternalTreeNode(ClientInfo clientInfo)(Code)
returns the DefaultMutableTreeNode that contains DefaultObjectInfo objects, suitable for serializing
Parameters:
  clientInfo - contains information about the client that will be the tree, used tocustomize the tree for that client



getTreeNode
public DefaultMutableTreeNode getTreeNode()(Code)
returns the DefaultMutableTreeNode that represents the present state of our connections



removeChannel
public void removeChannel(ChannelInfo channelInfo)(Code)
removes the specified Channel from the parent Session and notifies listeners



removeConsumer
public void removeConsumer(ConsumerInfo consumerInfo)(Code)
removes the specified Consumer from the specified Channel of the specified Session and notifies listeners



removeSession
public void removeSession(SessionInfo sessionInfo)(Code)
removes the specified Session from the sessionNodes and notifies listeners



removeSpecialClient
public void removeSpecialClient(ClientInfo clientInfo)(Code)
removes the specified Client from the ClientNodes and notifies listeners



removeTreeListener
public boolean removeTreeListener(SocketAdapter ts)(Code)
removes the specified TreeViewListener from both Admin and normal Client listeners



updateAvailable
public void updateAvailable(UpdateAvailableMsg msg, boolean adminOnly)(Code)
Uses the commandStatus connection on the server to issue objects to clients who have become TreeViewListeners, mainly used to send UpdateAvailableMsg objects, but can send any datashare.object object.
Parameters:
  object - the serializable object to send to the registered TreeViewListeners
Parameters:
  adminOnly - if true, this update is only sent to admin clients



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.