Java Doc for NameClassPair.java in  » 6.0-JDK-Core » naming » javax » naming » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » naming » javax.naming 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.naming.NameClassPair

All known Subclasses:   javax.naming.Binding,
NameClassPair
public class NameClassPair implements java.io.Serializable(Code)
This class represents the object name and class name pair of a binding found in a context.

A context consists of name-to-object bindings. The NameClassPair class represents the name and the class of the bound object. It consists of a name and a string representing the package-qualified class name.

Use subclassing for naming systems that generate contents of a name/class pair dynamically.

A NameClassPair instance is not synchronized against concurrent access by multiple threads. Threads that need to access a NameClassPair concurrently should synchronize amongst themselves and provide the necessary locking.
author:
   Rosanna Lee
author:
   Scott Seligman
version:
   1.17 07/05/05
See Also:   Context.list
since:
   1.3




Constructor Summary
public  NameClassPair(String name, String className)
     Constructs an instance of a NameClassPair given its name and class name.
Parameters:
  name - The non-null name of the object.
public  NameClassPair(String name, String className, boolean isRelative)
     Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context.
Parameters:
  name - The non-null name of the object.
Parameters:
  className - The possibly null class name of the objectbound to name.

Method Summary
public  StringgetClassName()
     Retrieves the class name of the object bound to the name of this binding.
public  StringgetName()
     Retrieves the name of this binding.
public  StringgetNameInNamespace()
     Retrieves the full name of this binding. The full name is the absolute name of this binding within its own namespace.
public  booleanisRelative()
     Determines whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
public  voidsetClassName(String name)
     Sets the class name of this binding.
public  voidsetName(String name)
     Sets the name of this binding.
public  voidsetNameInNamespace(String fullName)
     Sets the full name of this binding.
public  voidsetRelative(boolean r)
     Sets whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
public  StringtoString()
     Generates the string representation of this name/class pair.


Constructor Detail
NameClassPair
public NameClassPair(String name, String className)(Code)
Constructs an instance of a NameClassPair given its name and class name.
Parameters:
  name - The non-null name of the object. It is relativeto the target context (which isnamed by the first parameter of the list() method)
Parameters:
  className - The possibly null class name of the objectbound to name. It is null if the object bound is null.
See Also:   NameClassPair.getClassName
See Also:   NameClassPair.setClassName
See Also:   NameClassPair.getName
See Also:   NameClassPair.setName



NameClassPair
public NameClassPair(String name, String className, boolean isRelative)(Code)
Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context.
Parameters:
  name - The non-null name of the object.
Parameters:
  className - The possibly null class name of the objectbound to name. It is null if the object bound is null.
Parameters:
  isRelative - true if name is a name relativeto the target context (which is named by the first parameterof the list() method); false if nameis a URL string.
See Also:   NameClassPair.getClassName
See Also:   NameClassPair.setClassName
See Also:   NameClassPair.getName
See Also:   NameClassPair.setName
See Also:   NameClassPair.isRelative
See Also:   NameClassPair.setRelative




Method Detail
getClassName
public String getClassName()(Code)
Retrieves the class name of the object bound to the name of this binding. If a reference or some other indirect information is bound, retrieves the class name of the eventual object that will be returned by Binding.getObject(). The possibly null class name of object bound.It is null if the object bound is null.
See Also:   Binding.getObject
See Also:   Binding.getClassName
See Also:   NameClassPair.setClassName



getName
public String getName()(Code)
Retrieves the name of this binding. If isRelative() is true, this name is relative to the target context (which is named by the first parameter of the list()). If isRelative() is false, this name is a URL string. The non-null name of this binding.
See Also:   NameClassPair.isRelative
See Also:   NameClassPair.setName



getNameInNamespace
public String getNameInNamespace()(Code)
Retrieves the full name of this binding. The full name is the absolute name of this binding within its own namespace. See Context.getNameInNamespace .

In naming systems for which the notion of full name does not apply to this binding an UnsupportedOperationException is thrown. This exception is also thrown when a service provider written before the introduction of the method is in use.

The string returned by this method is not a JNDI composite name and should not be passed directly to context methods. The full name of this binding.
throws:
  UnsupportedOperationException - if the notion of full namedoes not apply to this binding in the naming system.
since:
   1.5
See Also:   NameClassPair.setNameInNamespace
See Also:   NameClassPair.getName




isRelative
public boolean isRelative()(Code)
Determines whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method). true if the name of this binding is relative to thetarget context;false if the name of this binding is a URL string.
See Also:   NameClassPair.setRelative
See Also:   NameClassPair.getName



setClassName
public void setClassName(String name)(Code)
Sets the class name of this binding.
Parameters:
  name - the possibly null string to use as the class name.If null, Binding.getClassName() will returnthe actual class name of the object in the binding.The class name will be null if the object bound is null.
See Also:   NameClassPair.getClassName
See Also:   Binding.getClassName



setName
public void setName(String name)(Code)
Sets the name of this binding.
Parameters:
  name - the non-null string to use as the name.
See Also:   NameClassPair.getName
See Also:   NameClassPair.setRelative



setNameInNamespace
public void setNameInNamespace(String fullName)(Code)
Sets the full name of this binding. This method must be called to set the full name whenever a NameClassPair is created and a full name is applicable to this binding.

Setting the full name to null, or not setting it at all, will cause getNameInNamespace() to throw an exception.
Parameters:
  fullName - The full name to use.
since:
   1.5
See Also:   NameClassPair.getNameInNamespace
See Also:   NameClassPair.setName




setRelative
public void setRelative(boolean r)(Code)
Sets whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method).
Parameters:
  r - If true, the name of binding is relative to the target context;if false, the name of binding is a URL string.
See Also:   NameClassPair.isRelative
See Also:   NameClassPair.setName



toString
public String toString()(Code)
Generates the string representation of this name/class pair. The string representation consists of the name and class name separated by a colon (':'). The contents of this string is useful for debugging and is not meant to be interpreted programmatically. The string representation of this name/class pair.



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.