Java Doc for NamingContext.java in  » Sevlet-Container » jetty-modules » org » mortbay » naming » 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 » Sevlet Container » jetty modules » org.mortbay.naming 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.mortbay.naming.NamingContext

NamingContext
public class NamingContext implements Context,Cloneable(Code)
NamingContext

Implementation of Context interface.

Notes

All Names are expected to be Compound, not Composite.

Usage


Inner Class :public class NameEnumeration implements NamingEnumeration
Inner Class :public class BindingEnumeration implements NamingEnumeration

Field Summary
final public static  EnumerationEMPTY_ENUM
    
final public static  StringLOCK_PROPERTY
    
final public static  StringUNLOCK_PROPERTY
    
protected  Hashtable_bindings
    
protected  Hashtable_env
    
protected  String_name
    
protected  Context_parent
    
protected  NameParser_parser
    

Constructor Summary
public  NamingContext(Hashtable env, String name, Context parent, NameParser parser)
    
public  NamingContext(Hashtable env)
     Creates a new NamingContext instance.
public  NamingContext()
    

Method Summary
protected  voidaddBinding(Name name, Object obj)
     Add a name to object binding to this Context.
public  ObjectaddToEnvironment(String propName, Object propVal)
    
public  voidbind(Name name, Object obj)
    
public  voidbind(String name, Object obj)
    
public  Objectclone()
    
public  voidclose()
    
public  NamecomposeName(Name name, Name prefix)
     Join two names together.
public  StringcomposeName(String name, String prefix)
     Join two names together.
public  ContextcreateSubcontext(Name name)
    
public  ContextcreateSubcontext(String name)
    
public  voiddestroySubcontext(String name)
    
public  voiddestroySubcontext(Name name)
    
protected  BindinggetBinding(Name name)
    
protected  BindinggetBinding(String name)
    
public  HashtablegetEnvironment()
     Get the environment of this Context.
public  StringgetName()
    
public  StringgetNameInNamespace()
     Get the full name of this Context node by visiting it's ancestors back to root.
public  NameParsergetNameParser(Name name)
     Return a NameParser for this Context.
public  NameParsergetNameParser(String name)
     Return a NameParser for this Context.
public  ContextgetParent()
    
public  NamingEnumerationlist(Name name)
    
public  NamingEnumerationlist(String name)
    
public  NamingEnumerationlistBindings(Name name)
    
public  NamingEnumerationlistBindings(String name)
    
public  Objectlookup(Name name)
    
public  Objectlookup(String name)
    
public  ObjectlookupLink(Name name)
    
public  ObjectlookupLink(String name)
    
public  voidrebind(Name name, Object obj)
    
public  voidrebind(String name, Object obj)
    
protected  voidremoveBinding(Name name)
    
public  ObjectremoveFromEnvironment(String propName)
     Remove a property from this Context's environment.
public  voidrename(Name oldName, Name newName)
    
public  voidrename(String oldName, String newName)
    
public  voidsetNameParser(NameParser parser)
    
public  NametoCanonicalName(Name name)
     Remove leading or trailing empty components from name.
public  voidunbind(String name)
     Not supported.
public  voidunbind(Name name)
     Not supported.

Field Detail
EMPTY_ENUM
final public static Enumeration EMPTY_ENUM(Code)



LOCK_PROPERTY
final public static String LOCK_PROPERTY(Code)



UNLOCK_PROPERTY
final public static String UNLOCK_PROPERTY(Code)



_bindings
protected Hashtable _bindings(Code)



_env
protected Hashtable _env(Code)



_name
protected String _name(Code)



_parent
protected Context _parent(Code)



_parser
protected NameParser _parser(Code)




Constructor Detail
NamingContext
public NamingContext(Hashtable env, String name, Context parent, NameParser parser)(Code)
Constructor
Parameters:
  env - environment properties
Parameters:
  name - relative name of this context
Parameters:
  parent - immediate ancestor Context (can be null)
Parameters:
  parser - NameParser for this Context



NamingContext
public NamingContext(Hashtable env)(Code)
Creates a new NamingContext instance.
Parameters:
  env - a Hashtable value



NamingContext
public NamingContext()(Code)
Constructor




Method Detail
addBinding
protected void addBinding(Name name, Object obj)(Code)
Add a name to object binding to this Context.
Parameters:
  name - a Name value
Parameters:
  obj - an Object value



addToEnvironment
public Object addToEnvironment(String propName, Object propVal) throws NamingException(Code)
Add an environment setting to this Context
Parameters:
  propName - name of the property to add
Parameters:
  propVal - value of the property to add propVal or previous value of the property
exception:
  NamingException - if an error occurs



bind
public void bind(Name name, Object obj) throws NamingException(Code)
Bind a name to an object
Parameters:
  name - Name of the object
Parameters:
  obj - object to bind
exception:
  NamingException - if an error occurs



bind
public void bind(String name, Object obj) throws NamingException(Code)
Bind a name (as a String) to an object
Parameters:
  name - a String value
Parameters:
  obj - an Object value
exception:
  NamingException - if an error occurs



clone
public Object clone() throws CloneNotSupportedException(Code)
Clone this NamingContext copy of this NamingContext
exception:
  CloneNotSupportedException - if an error occurs



close
public void close() throws NamingException(Code)
Do nothing
exception:
  NamingException - if an error occurs



composeName
public Name composeName(Name name, Name prefix) throws NamingException(Code)
Join two names together. These are treated as CompoundNames.
Parameters:
  name - a Name value
Parameters:
  prefix - a Name value a Name value
exception:
  NamingException - if an error occurs



composeName
public String composeName(String name, String prefix) throws NamingException(Code)
Join two names together. These are treated as CompoundNames.
Parameters:
  name - a Name value
Parameters:
  prefix - a Name value a Name value
exception:
  NamingException - if an error occurs



createSubcontext
public Context createSubcontext(Name name) throws NamingException(Code)
Create a context as a child of this one
Parameters:
  name - a Name value a Context value
exception:
  NamingException - if an error occurs



createSubcontext
public Context createSubcontext(String name) throws NamingException(Code)
Create a Context as a child of this one
Parameters:
  name - a String value a Context value
exception:
  NamingException - if an error occurs



destroySubcontext
public void destroySubcontext(String name) throws NamingException(Code)
Not supported
Parameters:
  name - name of subcontext to remove
exception:
  NamingException - if an error occurs



destroySubcontext
public void destroySubcontext(Name name) throws NamingException(Code)
Not supported
Parameters:
  name - name of subcontext to remove
exception:
  NamingException - if an error occurs



getBinding
protected Binding getBinding(Name name)(Code)
Get a name to object binding from this Context
Parameters:
  name - a Name value a Binding value



getBinding
protected Binding getBinding(String name)(Code)
Get a name to object binding from this Context
Parameters:
  name - as a String null or the Binding



getEnvironment
public Hashtable getEnvironment()(Code)
Get the environment of this Context. a copy of the environment of this Context.



getName
public String getName()(Code)
Getter for _name name of this Context (relative, not absolute)



getNameInNamespace
public String getNameInNamespace() throws NamingException(Code)
Get the full name of this Context node by visiting it's ancestors back to root. NOTE: if this Context has a URL namespace then the URL prefix will be missing the full name of this Context
exception:
  NamingException - if an error occurs



getNameParser
public NameParser getNameParser(Name name)(Code)
Return a NameParser for this Context.
Parameters:
  name - a Name value a NameParser value



getNameParser
public NameParser getNameParser(String name)(Code)
Return a NameParser for this Context.
Parameters:
  name - a Name value a NameParser value



getParent
public Context getParent()(Code)
Getter for _parent parent Context



list
public NamingEnumeration list(Name name) throws NamingException(Code)
List all names bound at Context named by Name
Parameters:
  name - a Name value a NamingEnumeration value
exception:
  NamingException - if an error occurs



list
public NamingEnumeration list(String name) throws NamingException(Code)
List all names bound at Context named by Name
Parameters:
  name - a Name value a NamingEnumeration value
exception:
  NamingException - if an error occurs



listBindings
public NamingEnumeration listBindings(Name name) throws NamingException(Code)
List all Bindings present at Context named by Name
Parameters:
  name - a Name value a NamingEnumeration value
exception:
  NamingException - if an error occurs



listBindings
public NamingEnumeration listBindings(String name) throws NamingException(Code)
List all Bindings at Name
Parameters:
  name - a String value a NamingEnumeration value
exception:
  NamingException - if an error occurs



lookup
public Object lookup(Name name) throws NamingException(Code)
Lookup a binding by name
Parameters:
  name - name of bound object
exception:
  NamingException - if an error occurs



lookup
public Object lookup(String name) throws NamingException(Code)
Lookup binding of an object by name
Parameters:
  name - name of bound object object bound to name
exception:
  NamingException - if an error occurs



lookupLink
public Object lookupLink(Name name) throws NamingException(Code)
Lookup link bound to name
Parameters:
  name - name of link binding LinkRef or plain object bound at name
exception:
  NamingException - if an error occurs



lookupLink
public Object lookupLink(String name) throws NamingException(Code)
Lookup link bound to name
Parameters:
  name - name of link binding LinkRef or plain object bound at name
exception:
  NamingException - if an error occurs



rebind
public void rebind(Name name, Object obj) throws NamingException(Code)
Overwrite or create a binding
Parameters:
  name - a Name value
Parameters:
  obj - an Object value
exception:
  NamingException - if an error occurs



rebind
public void rebind(String name, Object obj) throws NamingException(Code)
Overwrite or create a binding from Name to Object
Parameters:
  name - a String value
Parameters:
  obj - an Object value
exception:
  NamingException - if an error occurs



removeBinding
protected void removeBinding(Name name)(Code)



removeFromEnvironment
public Object removeFromEnvironment(String propName) throws NamingException(Code)
Remove a property from this Context's environment.
Parameters:
  propName - name of property to remove value of property or null if it didn't exist
exception:
  NamingException - if an error occurs



rename
public void rename(Name oldName, Name newName) throws NamingException(Code)
Not supported
Parameters:
  oldName - a Name value
Parameters:
  newName - a Name value
exception:
  NamingException - if an error occurs



rename
public void rename(String oldName, String newName) throws NamingException(Code)
Not supported
Parameters:
  oldName - a Name value
Parameters:
  newName - a Name value
exception:
  NamingException - if an error occurs



setNameParser
public void setNameParser(NameParser parser)(Code)
Setter for _parser



toCanonicalName
public Name toCanonicalName(Name name)(Code)
Remove leading or trailing empty components from name. Eg "/comp/env/" -> "comp/env"
Parameters:
  name - the name to normalize normalized name



unbind
public void unbind(String name) throws NamingException(Code)
Not supported.
Parameters:
  name - a String value
exception:
  NamingException - if an error occurs



unbind
public void unbind(Name name) throws NamingException(Code)
Not supported.
Parameters:
  name - a String value
exception:
  NamingException - if an error occurs



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.