com.sun.jndi.ldap.obj
Class MarshalledToObject

java.lang.Object
  extended by com.sun.jndi.ldap.obj.MarshalledToObject
All Implemented Interfaces:
javax.naming.spi.DirObjectFactory, javax.naming.spi.ObjectFactory

public class MarshalledToObject
extends java.lang.Object
implements javax.naming.spi.DirObjectFactory

An DirObjectFactory that returns the unmarshalled object from a MarshalledObject. For example, a Remote/JRMP object is stored as MarshalledObject. Use this factory to return its unmarshalled form (e.g., the Remote object).

Author:
Rosanna Lee

Constructor Summary
MarshalledToObject()
           
 
Method Summary
 java.lang.Object getObjectInstance(java.lang.Object orig, javax.naming.Name name, javax.naming.Context ctx, java.util.Hashtable env)
          Unmarshals a MarshalledObject.
 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)
          Unmarshals a MarshalledObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarshalledToObject

public MarshalledToObject()
Method Detail

getObjectInstance

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
Unmarshals a MarshalledObject.

Specified by:
getObjectInstance in interface javax.naming.spi.DirObjectFactory
Parameters:
orig - The possibly null object to check.
name - Ignored
ctx - Ignored
env - Ignored
attrs - The possibly attributes containing the "objectclass"
Returns:
The non-null unmarshalled object if orig is a MarshalledObject; otherwise null
Throws:
IOException - If problem unmarshalling the object
java.lang.ClassNotFoundException - If cannot find class required to unmarshal.
java.lang.Exception

getObjectInstance

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
Unmarshals a MarshalledObject.

Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Parameters:
orig - The possibly null object to check.
name - Ignored
ctx - Ignored
env - Ignored
Returns:
The non-null unmarshalled object if orig is a MarshalledObject; otherwise null
Throws:
IOException - If problem unmarshalling the object
java.lang.ClassNotFoundException - If cannot find class required to unmarshal.
java.lang.Exception