// Tie class generated by rmic, do not edit.
// Contents subject to change without notice.
package cyrille.rmi.iiop;
import java.rmi.Remote;
import javax.rmi.CORBA.Tie;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.ORB;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.UnknownException;
import org.omg.CORBA_2_3.portable.ObjectImpl;
public class _HelloWorldImpl_Tie extends ObjectImpl implements Tie {
private HelloWorldImpl target = null;
private static final String[] _type_ids = { "RMI:cyrille.rmi.iiop.HelloWorld:0000000000000000" };
public void setTarget(Remote target) {
this.target = (HelloWorldImpl) target;
}
public Remote getTarget() {
return this.target;
}
public org.omg.CORBA.Object thisObject() {
return this;
}
public void deactivate() {
_orb().disconnect(this);
_set_delegate(null);
this.target = null;
}
public ORB orb() {
return _orb();
}
public void orb(ORB orb) {
orb.connect(this);
}
@Override
public String[] _ids() {
return _type_ids;
}
public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException {
try {
org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream) _in;
if (method.equals("sayHello")) {
Request arg0 = (Request) in.read_value(Request.class);
Response result = this.target.sayHello(arg0);
org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
out.write_value(result, Response.class);
return out;
}
throw new BAD_OPERATION();
} catch (SystemException ex) {
throw ex;
} catch (Throwable ex) {
throw new UnknownException(ex);
}
}
}