Java Doc for NameService.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » pageflow » requeststate » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.pageflow.requeststate 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.beehive.netui.pageflow.requeststate.NameService

NameService
final public class NameService implements java.io.Serializable(Code)
This class implements a service that will name and track objects which implement the INameable interface. The typical use of this class is in the XmlHttpRequest request processing to lookup the object that should handle the request.


Field Summary
final public static  StringNAME_SERVICE_MUTEX_ATTRIBUTE
    


Method Summary
public  voidaddNamingObjectListener(NamingObjectListener nol)
     This method will add a NamingObjectListener to the set of listeners for the NamingObject event.
Parameters:
  nol - The NamingObjectListener to add as a listener.
public  voiddebugSetNameIntValue(int val)
     This is a debug method that will set the next integer value.
public  INameableget(String name)
     Given the name, return the INameable object stored by the NameService.
public  MapgetMap(String name, boolean create)
     This method will return the state map associated with the Nameable object if the object has been stored in the NameService and something has been stored into the Map.
public static  NameServiceinstance(HttpSession session)
     This will return the session specific instance of a NameService.
public synchronized  voidnameObject(String namePrefix, INameable object)
     This method will create a unique name for an INameable object.
public  voidput(INameable object)
     This method will store an INameable object into the NameService.
public  voidremoveNamingObjectListener(NamingObjectListener nol)
     This method will remove a NamingObjectListener from the set of listeners.
public static synchronized  NameServicestaticInstance()
     This will return a create a static name service.

Field Detail
NAME_SERVICE_MUTEX_ATTRIBUTE
final public static String NAME_SERVICE_MUTEX_ATTRIBUTE(Code)





Method Detail
addNamingObjectListener
public void addNamingObjectListener(NamingObjectListener nol)(Code)
This method will add a NamingObjectListener to the set of listeners for the NamingObject event.
Parameters:
  nol - The NamingObjectListener to add as a listener. This must not be null.
throws:
  IllegalArgumentException - when nol is null.



debugSetNameIntValue
public void debugSetNameIntValue(int val)(Code)
This is a debug method that will set the next integer value. This is used so tests can force the name.
Parameters:
  val - the integer value that will be forced to be the next value.



get
public INameable get(String name)(Code)
Given the name, return the INameable object stored by the NameService. Objects are stored in the NameService using WeakReferences so this will not keep an object alive. If the object is not found or has been reclaimed, this method will return null.
Parameters:
  name - The name of the object to get from the NameService INameable If the named object is stored by the name service, it will be returned otherwisenull is returned.



getMap
public Map getMap(String name, boolean create)(Code)
This method will return the state map associated with the Nameable object if the object has been stored in the NameService and something has been stored into the Map. Otherwise this will return null indicating that the map is empty. If the create parameter is true, we will always return the Map object.
Parameters:
  name - The name of the object to return the named object. This must not be null.
Parameters:
  create - This will create the map if necessary. A Map Object for the named object. This will return null if nothing has been stored inthe map and create is false.



instance
public static NameService instance(HttpSession session)(Code)
This will return the session specific instance of a NameService. There will only be a single NameService per session.
Parameters:
  session - the HttpSession that contains the NameService the NameService associated with the session.



nameObject
public synchronized void nameObject(String namePrefix, INameable object)(Code)
This method will create a unique name for an INameable object. The name will be unque within the session. This will throw an IllegalStateException if INameable.setObjectName has previously been called on object.
Parameters:
  namePrefix - The prefix of the generated name.
Parameters:
  object - the INameable object.
throws:
  IllegalStateException - if this method is called more than once for an object



put
public void put(INameable object)(Code)
This method will store an INameable object into the NameService. The name is obtained from the INameable. The object will be stored in the NameService with a WeakReference so the NameService will not keep an object alive.
Parameters:
  object - The INameable to be stored in the name service.



removeNamingObjectListener
public void removeNamingObjectListener(NamingObjectListener nol)(Code)
This method will remove a NamingObjectListener from the set of listeners. If the It is safe to call this if the NamingObjectListener hasn't been added to the listener list.
Parameters:
  nol - The NamingObjectListener to remove as a listener. This must not be null.
throws:
  IllegalArgumentException - when nol is null.



staticInstance
public static synchronized NameService staticInstance()(Code)
This will return a create a static name service. This is used mainly to test the Name service class. The statically scoped NameService



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.