throw new IllegalStateException("already used for export");
} else if (impl == null) {
throw new NullPointerException();
}
ref = new WeakReference(impl);
UnicastServerRef uref = getServerRef(new LiveRef(new ObjID(id), port));
try {
Object[] args = new Object[] { impl, null, Boolean.TRUE };
return (Remote) exportMethod.invoke(uref, args);
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();