package RTT.corba; /** * RTT/corba/_CTaskContextStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from TaskContext.idl * Wednesday, July 11, 2012 5:27:10 PM CEST */ /** * A CTaskContext is the main entry point of a distributed * component and maps to a RTT::TaskContext. * @ingroup CompIDL */ public class _CTaskContextStub extends org.omg.CORBA.portable.ObjectImpl implements RTT.corba.CTaskContext { /** * Return the instance name of this component. */ public String getName () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getName", true); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getName ( ); } finally { _releaseReply ($in); } } // getName /** * Return the description of this component. */ public String getDescription () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getDescription", true); $in = _invoke ($out); String $result = $in.read_string (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getDescription ( ); } finally { _releaseReply ($in); } } // getDescription /** * Returns the current state of the component. */ public RTT.corba.CTaskState getTaskState () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getTaskState", true); $in = _invoke ($out); RTT.corba.CTaskState $result = RTT.corba.CTaskStateHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getTaskState ( ); } finally { _releaseReply ($in); } } // getTaskState /** * Configure this component. * @see RTT::base::TaskCore::configure() */ public boolean configure () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("configure", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return configure ( ); } finally { _releaseReply ($in); } } // configure /** * Start this component. * @see RTT::base::TaskCore::start() */ public boolean start () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("start", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return start ( ); } finally { _releaseReply ($in); } } // start /** * Activate this component. * @see RTT::base::TaskCore::activate() */ public boolean activate () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("activate", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return activate ( ); } finally { _releaseReply ($in); } } // activate /** * Stop this component. * @see RTT::base::TaskCore::stop() */ public boolean stop () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("stop", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return stop ( ); } finally { _releaseReply ($in); } } // stop /** * Asks the component to transition from an Exception state to the * Stopped state * @see RTT::base::TaskCore::exception() and * RTT::base::TaskCore::recover() */ public boolean resetException () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("resetException", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return resetException ( ); } finally { _releaseReply ($in); } } // resetException /** * Cleanup this component. * @see RTT::base::TaskCore::cleanup() */ public boolean cleanup () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("cleanup", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return cleanup ( ); } finally { _releaseReply ($in); } } // cleanup /** * Is this component's ExecutionEngine active ? * @see RTT::base::TaskCore::isActive() */ public boolean isActive () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("isActive", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return isActive ( ); } finally { _releaseReply ($in); } } // isActive /** * Is this component running ? * @see RTT::base::TaskCore::isRunning() */ public boolean isRunning () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("isRunning", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return isRunning ( ); } finally { _releaseReply ($in); } } // isRunning /** * Is this component configured ? * @see RTT::base::TaskCore::isConfigured() */ public boolean isConfigured () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("isConfigured", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return isConfigured ( ); } finally { _releaseReply ($in); } } // isConfigured /** * Is this component in a Fatal error state ? * @see RTT::base::TaskCore::inFatalError() */ public boolean inFatalError () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("inFatalError", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return inFatalError ( ); } finally { _releaseReply ($in); } } // inFatalError /** * Is this component in a RunTime error state ? * @see RTT::base::TaskCore::inRunTimeError() */ public boolean inRunTimeError () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("inRunTimeError", true); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return inRunTimeError ( ); } finally { _releaseReply ($in); } } // inRunTimeError /** * Access to the Data Flow ports. * @see RTT::base::TaskCore::ports() */ public RTT.corba.CDataFlowInterface ports () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("ports", true); $in = _invoke ($out); RTT.corba.CDataFlowInterface $result = RTT.corba.CDataFlowInterfaceHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return ports ( ); } finally { _releaseReply ($in); } } // ports /** * Get a service. * * Use 'this' as the name to get the task context's own service * provider * * @see RTT::TaskContext::provides() */ public RTT.corba.CService getProvider (String service_name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getProvider", true); $out.write_string (service_name); $in = _invoke ($out); RTT.corba.CService $result = RTT.corba.CServiceHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getProvider (service_name ); } finally { _releaseReply ($in); } } // getProvider /** * Get a required service. * @see RTT::TaskContext::requires() */ public RTT.corba.CServiceRequester getRequester (String service_name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getRequester", true); $out.write_string (service_name); $in = _invoke ($out); RTT.corba.CServiceRequester $result = RTT.corba.CServiceRequesterHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getRequester (service_name ); } finally { _releaseReply ($in); } } // getRequester /** * Get a list of all the peers this task is connected to. * @see RTT::TaskContext::getPeerList() */ public String[] getPeerList () { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPeerList", true); $in = _invoke ($out); String $result[] = RTT.corba.CTaskContextPackage.CPeerNamesHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPeerList ( ); } finally { _releaseReply ($in); } } // getPeerList /** * Get a peer this task is connected to. * @see RTT::TaskContext::getPeer() */ public RTT.corba.CTaskContext getPeer (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("getPeer", true); $out.write_string (name); $in = _invoke ($out); RTT.corba.CTaskContext $result = RTT.corba.CTaskContextHelper.read ($in); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return getPeer (name ); } finally { _releaseReply ($in); } } // getPeer /** * Has this task a peer with given name ? * @see RTT::TaskContext::hasPeer() */ public boolean hasPeer (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("hasPeer", true); $out.write_string (name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return hasPeer (name ); } finally { _releaseReply ($in); } } // hasPeer /** * Add a one-way peer connection. * @see RTT::TaskContext::addPeer() */ public boolean addPeer (RTT.corba.CTaskContext p, String peer_alias) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("addPeer", true); RTT.corba.CTaskContextHelper.write ($out, p); $out.write_string (peer_alias); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return addPeer (p, peer_alias ); } finally { _releaseReply ($in); } } // addPeer /** * Remove a one-way peer connection. * @see RTT::TaskContext::removePeer() */ public boolean removePeer (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("removePeer", true); $out.write_string (name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return removePeer (name ); } finally { _releaseReply ($in); } } // removePeer /** * Create a two-way peer connection. * @see RTT::TaskContext::connectPeers() */ public boolean connectPeers (RTT.corba.CTaskContext p) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("connectPeers", true); RTT.corba.CTaskContextHelper.write ($out, p); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return connectPeers (p ); } finally { _releaseReply ($in); } } // connectPeers /** * Destroy a two-way peer connection. * @see RTT::TaskContext::disconnectPeers() */ public boolean disconnectPeers (String name) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("disconnectPeers", true); $out.write_string (name); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return disconnectPeers (name ); } finally { _releaseReply ($in); } } // disconnectPeers /** * Connect all compatible and equally named * data ports with another CTaskContext's * data ports. * @see RTT::TaskContext::connectPorts() */ public boolean connectPorts (RTT.corba.CTaskContext p) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("connectPorts", true); RTT.corba.CTaskContextHelper.write ($out, p); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return connectPorts (p ); } finally { _releaseReply ($in); } } // connectPorts /** * Connect all compatible and equally named * services with another CTaskContext's * services. * @see RTT::TaskContext::connectServices() */ public boolean connectServices (RTT.corba.CTaskContext p) { org.omg.CORBA.portable.InputStream $in = null; try { org.omg.CORBA.portable.OutputStream $out = _request ("connectServices", true); RTT.corba.CTaskContextHelper.write ($out, p); $in = _invoke ($out); boolean $result = $in.read_boolean (); return $result; } catch (org.omg.CORBA.portable.ApplicationException $ex) { $in = $ex.getInputStream (); String _id = $ex.getId (); throw new org.omg.CORBA.MARSHAL (_id); } catch (org.omg.CORBA.portable.RemarshalException $rm) { return connectServices (p ); } finally { _releaseReply ($in); } } // connectServices // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:RTT/corba/CTaskContext:1.0"}; public String[] _ids () { return (String[])__ids.clone (); } private void readObject (java.io.ObjectInputStream s) throws java.io.IOException { String str = s.readUTF (); String[] args = null; java.util.Properties props = null; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props); try { org.omg.CORBA.Object obj = orb.string_to_object (str); org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); _set_delegate (delegate); } finally { orb.destroy() ; } } private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException { String[] args = null; java.util.Properties props = null; org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init (args, props); try { String str = orb.object_to_string (this); s.writeUTF (str); } finally { orb.destroy() ; } } } // class _CTaskContextStub