package SimRATApp;
/**
* SimRATApp/_SimRATStub.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from SimRAT.idl
* Sunday, June 8, 2014 1:31:33 AM IST
*/
public class _SimRATStub extends org.omg.CORBA.portable.ObjectImpl implements SimRATApp.SimRAT
{
public SimRATApp.Image getScreenshot ()
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("getScreenshot", true);
$in = _invoke ($out);
SimRATApp.Image $result = SimRATApp.ImageHelper.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 getScreenshot ( );
} finally {
_releaseReply ($in);
}
} // getScreenshot
public void mouseMove (int x, int y)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("mouseMove", true);
$out.write_long (x);
$out.write_long (y);
$in = _invoke ($out);
return;
} 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) {
mouseMove (x, y );
} finally {
_releaseReply ($in);
}
} // mouseMove
public void mousePress (int x, int y, int button)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("mousePress", true);
$out.write_long (x);
$out.write_long (y);
$out.write_long (button);
$in = _invoke ($out);
return;
} 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) {
mousePress (x, y, button );
} finally {
_releaseReply ($in);
}
} // mousePress
public void mouseRelease (int x, int y, int button)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("mouseRelease", true);
$out.write_long (x);
$out.write_long (y);
$out.write_long (button);
$in = _invoke ($out);
return;
} 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) {
mouseRelease (x, y, button );
} finally {
_releaseReply ($in);
}
} // mouseRelease
public void keyPress (int keyCode)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("keyPress", true);
$out.write_long (keyCode);
$in = _invoke ($out);
return;
} 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) {
keyPress (keyCode );
} finally {
_releaseReply ($in);
}
} // keyPress
public void keyReleased (int keyCode)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("keyReleased", true);
$out.write_long (keyCode);
$in = _invoke ($out);
return;
} 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) {
keyReleased (keyCode );
} finally {
_releaseReply ($in);
}
} // keyReleased
public void uploadFileToServer (SimRATApp.SimRATFile inFile)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("uploadFileToServer", true);
SimRATApp.SimRATFileHelper.write ($out, inFile);
$in = _invoke ($out);
return;
} 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) {
uploadFileToServer (inFile );
} finally {
_releaseReply ($in);
}
} // uploadFileToServer
public SimRATApp.SimRATFile downloadFileFromServer (String fPath)
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("downloadFileFromServer", true);
$out.write_string (fPath);
$in = _invoke ($out);
SimRATApp.SimRATFile $result = SimRATApp.SimRATFileHelper.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 downloadFileFromServer (fPath );
} finally {
_releaseReply ($in);
}
} // downloadFileFromServer
public void shutdown ()
{
org.omg.CORBA.portable.InputStream $in = null;
try {
org.omg.CORBA.portable.OutputStream $out = _request ("shutdown", false);
$in = _invoke ($out);
return;
} 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) {
shutdown ( );
} finally {
_releaseReply ($in);
}
} // shutdown
// Type-specific CORBA::Object operations
private static String[] __ids = {
"IDL:SimRATApp/SimRAT: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 _SimRATStub