// Stub class generated by rmic, do not edit.
// Contents subject to change without notice.
package cyrille.rmi.iiop;
import java.rmi.UnexpectedException;
import javax.rmi.CORBA.Stub;
import javax.rmi.CORBA.Util;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.ApplicationException;
import org.omg.CORBA.portable.RemarshalException;
import org.omg.CORBA.portable.ServantObject;
public class _HelloWorld_Stub extends Stub implements HelloWorld {
/**
*
*/
private static final long serialVersionUID = 1L;
private static final String[] _type_ids = { "RMI:cyrille.rmi.iiop.HelloWorld:0000000000000000" };
@Override
public String[] _ids() {
return _type_ids;
}
public Response sayHello(Request arg0) throws java.rmi.RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA_2_3.portable.InputStream in = null;
try {
org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHello", true);
out.write_value(arg0, Request.class);
in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
return (Response) in.read_value(Response.class);
} catch (ApplicationException ex) {
in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
String $_id = in.read_string();
throw new UnexpectedException($_id);
} catch (RemarshalException ex) {
return sayHello(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("sayHello", HelloWorld.class);
if (so == null) {
return sayHello(arg0);
}
try {
Request arg0Copy = (Request) Util.copyObject(arg0, _orb());
Response result = ((HelloWorld) so.servant).sayHello(arg0Copy);
return (Response) Util.copyObject(result, _orb());
} catch (Throwable ex) {
Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
}