package RTT.corba; /** * RTT/corba/CRemoteChannelElementPOA.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from DataFlow.idl * Wednesday, July 11, 2012 5:26:42 PM CEST */ /** * The advanced channel element interface, used by Orocos * to relay over-CORBA data flow connections. */ public abstract class CRemoteChannelElementPOA extends org.omg.PortableServer.Servant implements RTT.corba.CRemoteChannelElementOperations, org.omg.CORBA.portable.InvokeHandler { // Constructors private static java.util.Hashtable _methods = new java.util.Hashtable (); static { _methods.put ("setRemoteSide", new java.lang.Integer (0)); _methods.put ("remoteSignal", new java.lang.Integer (1)); _methods.put ("remoteDisconnect", new java.lang.Integer (2)); _methods.put ("read", new java.lang.Integer (3)); _methods.put ("write", new java.lang.Integer (4)); _methods.put ("disconnect", new java.lang.Integer (5)); } public org.omg.CORBA.portable.OutputStream _invoke (String $method, org.omg.CORBA.portable.InputStream in, org.omg.CORBA.portable.ResponseHandler $rh) { org.omg.CORBA.portable.OutputStream out = null; java.lang.Integer __method = (java.lang.Integer)_methods.get ($method); if (__method == null) throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); switch (__method.intValue ()) { /** * Used to inform this channel element which the other * side is such that they can relay a signal or disconnect. */ case 0: // RTT/corba/CRemoteChannelElement/setRemoteSide { RTT.corba.CRemoteChannelElement other = RTT.corba.CRemoteChannelElementHelper.read (in); this.setRemoteSide (other); out = $rh.createReply(); break; } /** * Used by the 'remote' side to inform this channel element that new data * is available for reading. * @return false if this channel became invalidated. */ case 1: // RTT/corba/CRemoteChannelElement/remoteSignal { boolean $result = false; $result = this.remoteSignal (); out = $rh.createReply(); out.write_boolean ($result); break; } /** * Used by the 'remote' side to inform this channel element * that the connection is been cleaned up. * @param writer_to_reader Since channel elements are chained, * we need to know who initiated the disconnect: starting from * the output port (writer_to_reader == true) or from the * input port (writer_to_reader == false) */ case 2: // RTT/corba/CRemoteChannelElement/remoteDisconnect { boolean writer_to_reader = in.read_boolean (); this.remoteDisconnect (writer_to_reader); out = $rh.createReply(); break; } /** * Reads from this Channel Element. */ case 3: // RTT/corba/CChannelElement/read { org.omg.CORBA.AnyHolder sample = new org.omg.CORBA.AnyHolder (); boolean copy_old_data = in.read_boolean (); RTT.corba.CFlowStatus $result = null; $result = this.read (sample, copy_old_data); out = $rh.createReply(); RTT.corba.CFlowStatusHelper.write (out, $result); out.write_any (sample.value); break; } /** * Writes into this Channel Element. * @return false if the channel became invalid */ case 4: // RTT/corba/CChannelElement/write { org.omg.CORBA.Any sample = in.read_any (); boolean $result = false; $result = this.write (sample); out = $rh.createReply(); out.write_boolean ($result); break; } /** * Disconnect and dispose this object. * You may no longer use this object after calling this method. */ case 5: // RTT/corba/CChannelElement/disconnect { this.disconnect (); out = $rh.createReply(); break; } default: throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); } return out; } // _invoke // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:RTT/corba/CRemoteChannelElement:1.0", "IDL:RTT/corba/CChannelElement:1.0"}; public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) { return (String[])__ids.clone (); } public CRemoteChannelElement _this() { return CRemoteChannelElementHelper.narrow( super._this_object()); } public CRemoteChannelElement _this(org.omg.CORBA.ORB orb) { return CRemoteChannelElementHelper.narrow( super._this_object(orb)); } } // class CRemoteChannelElementPOA