|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jndi.ldap.obj.AttrsToCorba
public class AttrsToCorba
A DirObjectFactory that returns a omg.org.CORBA.Object when given attributes that contain the objectclass "corbaObject". The form of getObjectInstance() that does not accept an Attributes parameter always return null because using it would impose too much overhead (incurs an extra search each time). The caller should always use the form of getObjectInstance() that accepts an Attributes parameter. This is the case if the service provider uses DirectoryManager.
The LDAP schema for CORBA objects is:
objectClass: top, corbaObject, corbaContainer corbaIor: IOR of CORBA object
Field Summary | |
---|---|
private static org.omg.CORBA.ORB |
defaultOrb
|
Constructor Summary | |
---|---|
AttrsToCorba()
|
Method Summary | |
---|---|
private static org.omg.CORBA.ORB |
getDefaultOrb(java.util.Hashtable env)
Return default ORB. |
java.lang.Object |
getObjectInstance(java.lang.Object orig,
javax.naming.Name name,
javax.naming.Context ctx,
java.util.Hashtable env)
Always returns null. |
java.lang.Object |
getObjectInstance(java.lang.Object orig,
javax.naming.Name name,
javax.naming.Context ctx,
java.util.Hashtable env,
javax.naming.directory.Attributes attrs)
Returns a CORBA object if attributes represents a "corbaObject". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.omg.CORBA.ORB defaultOrb
Constructor Detail |
---|
public AttrsToCorba()
Method Detail |
---|
public java.lang.Object getObjectInstance(java.lang.Object orig, javax.naming.Name name, javax.naming.Context ctx, java.util.Hashtable env, javax.naming.directory.Attributes attrs) throws java.lang.Exception
If attrs's objectclass attribute has the value "corbaObject" or "corbaobject", this factory will use the directory entry's "corbaIor" attribute to get the stringified IOR, which is then converted into a CORBA object. The "corbaIor" attribute is obtained from attrs, and if not available from there, from the directory using the DirContext, orig.
getObjectInstance
in interface javax.naming.spi.DirObjectFactory
orig
- The non-null DirContext object representing the directory entry;
If not a DirContext, return null.name
- Ignoredctx
- Ignoredenv
- The possibly null environment properties. The caller can pass
the ORB to use (via the java.naming.corba.orb property)
or pass properties like the applet and the org.omg.CORBA.*
properties for creating the ORB. If none of these is available,
a default (static) ORB is used.attrs
- The possibly null attributes containing at least the
directory entry's objectclass attribute.
javax.naming.NamingException
- If an error is encountered while getting the
corbaIor attribute using orig.
java.lang.Exception
- If an error occurred while converting the IOR to
a CORBA object or using the ORB.public java.lang.Object getObjectInstance(java.lang.Object orig, javax.naming.Name name, javax.naming.Context ctx, java.util.Hashtable env) throws java.lang.Exception
getObjectInstance
in interface javax.naming.spi.ObjectFactory
orig
- Ignoredname
- Ignoredctx
- Ignoredenv
- Ignored
java.lang.Exception
- Never thrownprivate static org.omg.CORBA.ORB getDefaultOrb(java.util.Hashtable env)
env
- The possibly null environment properties. The caller can pass
the ORB to use (via the java.naming.corba.orb property)
or pass properties like the applet and the org.omg.CORBA.*
properties for creating the ORB.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |