| java.lang.Object javax.naming.NameClassPair javax.naming.Binding
All known Subclasses: javax.naming.directory.SearchResult,
Binding | public class Binding extends NameClassPair (Code) | | Binding extends NameClassPair to associate an object in a
naming service with its name, specified class name and relative flag. As with
NameClassPair , a class name is only specified when it is
necessary to override the real class name of the associated object.
Multithreaded access to a Binding instance is only safe when
client code locks the object first.
|
Constructor Summary | |
public | Binding(String name, Object obj) Construct a Binding from a name and a class. | public | Binding(String name, Object obj, boolean relative) Construct a Binding from a name, an object and a relative
flag. | public | Binding(String name, String className, Object obj) Construct a Binding from a name, a class, and an object.
The class and object parameters may be null. | public | Binding(String name, String className, Object obj, boolean relative) Construct a Binding from a name, a class, an object and a
relative flag. |
Binding | public Binding(String name, Object obj)(Code) | | Construct a Binding from a name and a class. Relative flag
is true.
Parameters: name - a name, may not be null . Parameters: obj - an object bound with the name, may be null . |
Binding | public Binding(String name, Object obj, boolean relative)(Code) | | Construct a Binding from a name, an object and a relative
flag.
Parameters: name - a name, which may not be null . Parameters: obj - an object bound with the name, may be null . Parameters: relative - a relative flag |
Binding | public Binding(String name, String className, Object obj)(Code) | | Construct a Binding from a name, a class, and an object.
The class and object parameters may be null. Relative flag is true.
Parameters: name - a name, which may not be null . Parameters: className - a class name, may be null . Parameters: obj - an object bound with the name, may be null . |
Binding | public Binding(String name, String className, Object obj, boolean relative)(Code) | | Construct a Binding from a name, a class, an object and a
relative flag. The class and object parameters may be null.
Parameters: name - a name, which may not be null . Parameters: className - a class name, may be null . Parameters: obj - an object bound with the name, may be null . Parameters: relative - a relative flag |
getClassName | public String getClassName()(Code) | | Get the class name of this Binding . It may have been
specified, in which case the class name field is set, and that is the
string returned by this method. If the class name field has not been
specified then the object associated with this Binding is
interrogated to find its actual class name. If there is no class name
field specified and no associated object then this method returns null.
the class name |
getObject | public Object getObject()(Code) | | Get the object associated with this Binding . May return
null.
the object associated with this Binding . Mayreturn null. |
setObject | public void setObject(Object object)(Code) | | Set the object o associated with this Binding . The object
may be null.
Parameters: object - an object |
toString | public String toString()(Code) | | Provide a string representation of this object. This is the same as for
NameClassPair but with the string representation of the
Binding object appended to the end.
a string representation of this Binding |
|
|