Re: Problem with CORBA Tutorial
On 16 Jul., 13:23, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
you see what PingObjectImpl extends. That class will have such a
constructor.
That is my problem: No it doesn't.
PingObjectImpl extends an automatically generated CORBA file called
_PingObjectImplBase which just seems to have a blank constructor.
Maybe a CORBA specialist can guess what the author of this tutorial
meant by doing this?
Maybe I am not generating the correct versions of the files from the
idl file?
Here is the content of the generated file _PingObjectImplBase.java:
package PPModule;
/**
* PPModule/_PingObjectImplBase.java .
* Generated by the IDL-to-Java compiler (portable), version "3.1"
* from pingpong.idl
* Sonntag, 15. Juli 2007 15.01 Uhr CEST
*/
public abstract class _PingObjectImplBase extends
org.omg.CORBA.portable.ObjectImpl
implements PPModule.PingObject,
org.omg.CORBA.portable.InvokeHandler
{
// Constructors
public _PingObjectImplBase ()
{
}
private static java.util.Hashtable _methods = new
java.util.Hashtable ();
static
{
_methods.put ("_get_maxPings", new java.lang.Integer (0));
_methods.put ("_set_maxPings", new java.lang.Integer (1));
_methods.put ("ping", new java.lang.Integer (2));
}
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 ())
{
case 0: // PPModule/PingObject/_get_maxPings
{
int $result = (int)0;
$result = this.maxPings ();
out = $rh.createReply();
out.write_long ($result);
break;
}
case 1: // PPModule/PingObject/_set_maxPings
{
int newMaxPings = in.read_long ();
this.maxPings (newMaxPings);
out = $rh.createReply();
break;
}
case 2: // PPModule/PingObject/ping
{
PPModule.PongObject po = PPModule.PongObjectHelper.read (in);
int count = in.read_long ();
int $result = (int)0;
$result = this.ping (po, count);
out = $rh.createReply();
out.write_long ($result);
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:PPModule/PingObject:1.0"};
public String[] _ids ()
{
return (String[])__ids.clone ();
}
} // class _PingObjectImplBase