Class JNDIStateFactoryImpl
- java.lang.Object
-
- com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
-
- All Implemented Interfaces:
javax.naming.spi.StateFactory
public class JNDIStateFactoryImpl extends java.lang.Object implements javax.naming.spi.StateFactory
StateFactory that turns java.rmi.Remote objects to org.omg.CORBA.Object. This version works either with standard RMI-IIOP or Dynamic RMI-IIOP.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ConcurrentMap<java.lang.Class<?>,java.lang.reflect.Field>
orbFields
-
Constructor Summary
Constructors Constructor Description JNDIStateFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.reflect.Field
getField(java.lang.Class<?> aClass, java.lang.String fieldName)
private ORB
getORB(javax.naming.Context ctx)
private java.lang.reflect.Field
getOrbField(javax.naming.Context ctx)
java.lang.Object
getStateToBind(java.lang.Object orig, javax.naming.Name name, javax.naming.Context ctx, java.util.Hashtable<?,?> env)
Returns the CORBA object for a Remote object.
-
-
-
Method Detail
-
getStateToBind
public java.lang.Object getStateToBind(java.lang.Object orig, javax.naming.Name name, javax.naming.Context ctx, java.util.Hashtable<?,?> env) throws javax.naming.NamingException
Returns the CORBA object for a Remote object. If input is not a Remote object, or if Remote object uses JRMP, return null. If the RMI-IIOP library is not available, throw ConfigurationException.- Specified by:
getStateToBind
in interfacejavax.naming.spi.StateFactory
- Parameters:
orig
- The object to turn into a CORBA object. If not Remote, or if is a JRMP stub or impl, return null.name
- Ignoredctx
- The non-null CNCtx whose ORB to use.env
- Ignored- Returns:
- The CORBA object for orig or null.
- Throws:
javax.naming.ConfigurationException
- If the CORBA object cannot be obtained due to configuration problemsjavax.naming.NamingException
- If some other problem prevented a CORBA object from being obtained from the Remote object.
-
getORB
private ORB getORB(javax.naming.Context ctx)
-
getOrbField
private java.lang.reflect.Field getOrbField(javax.naming.Context ctx)
-
getField
private java.lang.reflect.Field getField(java.lang.Class<?> aClass, java.lang.String fieldName)
-
-