ResolveResult.java [plain text]
package javax.naming.spi;
import javax.naming.*;
import java.util.EventObject;
import java.io.Serializable;
public class ResolveResult implements Serializable
{
protected Object resolvedObj;
protected Name remainingName;
protected ResolveResult()
{
resolvedObj = null;
remainingName = null;
}
public ResolveResult(Object robj, String rcomp)
{
if (robj == null || rcomp == null)
throw new IllegalArgumentException ();
resolvedObj = robj;
remainingName = new CompositeName ();
try
{
remainingName.add (rcomp);
}
catch (InvalidNameException _)
{
}
}
public ResolveResult(Object robj, Name rname)
{
resolvedObj = robj;
remainingName = rname;
}
public Name getRemainingName()
{
return remainingName;
}
public Object getResolvedObj()
{
return resolvedObj;
}
public void setRemainingName(Name name)
{
remainingName = (Name) name.clone();
}
public void appendRemainingName(Name name)
{
try
{
remainingName.addAll(name);
}
catch (InvalidNameException _)
{
}
}
public void appendRemainingComponent(String name)
{
try
{
remainingName.add(name);
}
catch (InvalidNameException _)
{
}
}
public void setResolvedObj(Object obj)
{
resolvedObj = obj;
}
}