// Tie class generated by rmic, do not edit. // Contents subject to change without notice. package com.healthmarketscience.rmiio; import java.io.IOException; import java.io.Serializable; import java.rmi.Remote; import java.rmi.RemoteException; import javax.rmi.CORBA.Tie; import javax.rmi.CORBA.Util; 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.PortableServer.Servant; public class _RemoteOutputStreamServer_Tie extends Servant implements Tie { private RemoteOutputStreamServer target = null; private static final String[] _type_ids = { "RMI:com.healthmarketscience.rmiio.RemoteOutputStream:0000000000000000" }; public void setTarget(Remote target) { this.target = (RemoteOutputStreamServer) target; } public Remote getTarget() { return target; } public org.omg.CORBA.Object thisObject() { return _this_object(); } public void deactivate() { try{ _poa().deactivate_object(_poa().servant_to_id(this)); }catch (org.omg.PortableServer.POAPackage.WrongPolicy exception){ }catch (org.omg.PortableServer.POAPackage.ObjectNotActive exception){ }catch (org.omg.PortableServer.POAPackage.ServantNotActive exception){ } } public ORB orb() { return _orb(); } public void orb(ORB orb) { try { ((org.omg.CORBA_2_3.ORB)orb).set_delegate(this); } catch(ClassCastException e) { throw new org.omg.CORBA.BAD_PARAM ("POA Servant requires an instance of org.omg.CORBA_2_3.ORB"); } } public String[] _all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId){ 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; switch (method.charAt(0)) { case 99: if (method.equals("close")) { boolean arg0 = in.read_boolean(); try { target.close(arg0); } catch (IOException ex) { String id = "IDL:java/io/IOEx:1.0"; org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createExceptionReply(); out.write_string(id); out.write_value(ex,IOException.class); return out; } OutputStream out = reply.createReply(); return out; } case 102: if (method.equals("flush")) { try { target.flush(); } catch (IOException ex) { String id = "IDL:java/io/IOEx:1.0"; org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createExceptionReply(); out.write_string(id); out.write_value(ex,IOException.class); return out; } OutputStream out = reply.createReply(); return out; } case 117: if (method.equals("usingGZIPCompression")) { boolean result; try { result = target.usingGZIPCompression(); } catch (IOException ex) { String id = "IDL:java/io/IOEx:1.0"; org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createExceptionReply(); out.write_string(id); out.write_value(ex,IOException.class); return out; } OutputStream out = reply.createReply(); out.write_boolean(result); return out; } case 119: if (method.equals("writePacket")) { byte[] arg0 = (byte[]) in.read_value(byte[].class); int arg1 = in.read_long(); try { target.writePacket(arg0, arg1); } catch (IOException ex) { String id = "IDL:java/io/IOEx:1.0"; org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createExceptionReply(); out.write_string(id); out.write_value(ex,IOException.class); return out; } OutputStream out = reply.createReply(); return out; } } throw new BAD_OPERATION(); } catch (SystemException ex) { throw ex; } catch (Throwable ex) { throw new UnknownException(ex); } } }