Loading ...
Sorry, an error occurred while loading the content.
 

RV: idl syntax questions & java inheritance

Expand Messages
  • Francisco Javier Alcaniz Ribera
    Hello. I´m developing a little application where I must define a remote object that must inherit from java class java.util.Vector, and here comes the problem
    Message 1 of 1 , Feb 1, 2001
      Hello. I´m developing a little application where I must define a remote object that
      must inherit from java class java.util.Vector, and here comes the problem because we can implement that object after defined it with an idl interface declaration, extending a class _<name interface>ImplBase.java, so java doesn´t support multiple inheritance.
      An exemple would be this

      module Svr{
      interface Iobject{
      void method();
      };
      };

      idl compiler generates
      /Svr/_IobjectImplBase.java

      so if we want implementing the interface we do

      class Iobject extends Svr._IobjectImplBase.java{
      void method( ){
      ......}
      } / *end class*/

      but HOW CAN I INDICATE THAT Iobject class must inherit from java.util.vector if extends is already defined and java doesn´t allow multiple inheritance?
      ..Possible solutions thought which aren´t working
      1) insert within the idl file
      module java{
      module util{
      interface Vector{....};
      };
      };
      This creates in my actual directory the structure /myactualdirectory/java/util so I don´t want to do this.
      2) interface Iobject that inherits from ::java::util::Vector like this
      module Svr{
      interface Iobject: ::java::util::Vector{
      void method();
      };
      };
      this implies compiler error "java not defined"

      WHAT CAN I DO? IS POSSIBLE REMOTE OBJECTS WITH JAVA CLASSES INHERITANCE?
      THANKS ALL FOR READING THIS
      EXCUSE MY ENGLISH
    Your message has been successfully submitted and would be delivered to recipients shortly.