⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _interfacenamestub.java

📁 高级java2 大学教程(含源码,经典的Java学习教程
💻 JAVA
字号:
package maptest;


/**
* maptest/_InterfaceNameStub.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from maptest.idl
* Monday, May 14, 2001 4:18:09 PM PDT
*/


// the interface declaration for InterfaceName
public class _InterfaceNameStub extends org.omg.CORBA.portable.ObjectImpl implements maptest.InterfaceName
{
  // Constructors
  // NOTE:  If the default constructor is used, the
  //        object is useless until _set_delegate (...)
  //        is called.
  public _InterfaceNameStub ()
  {
    super ();
  }

  public _InterfaceNameStub (org.omg.CORBA.portable.Delegate delegate)
  {
    super ();
    _set_delegate (delegate);
  }


  // comment above the readwrite attribute
  public int anAttribute ()
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("_get_anAttribute", true);
       _in = _invoke (_out);
       int __result = _in.read_long ();
       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 anAttribute ();
    } finally {
        _releaseReply (_in);
    }
  } // anAttribute


  // comment above the readwrite attribute
  public void anAttribute (int newAnAttribute)
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("_set_anAttribute", true);
       _out.write_long (newAnAttribute);
       _in = _invoke (_out);
    } 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) {
       anAttribute (newAnAttribute);
    } finally {
        _releaseReply (_in);
    }
  } // anAttribute

  public int roAttribute ()
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("_get_roAttribute", true);
       _in = _invoke (_out);
       int __result = _in.read_long ();
       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 roAttribute ();
    } finally {
        _releaseReply (_in);
    }
  } // roAttribute


  // comment above our methods
  public void seqMethod (maptest.StructMap[] seq)
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("seqMethod", true);
       maptest.StructMapSeqHelper.write (_out, seq);
       _in = _invoke (_out);
    } 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) {
       seqMethod (seq);
    } finally {
        _releaseReply (_in);
    }
  } // seqMethod

  public void boundSeqMethod (maptest.StructMap[] seq)
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("boundSeqMethod", true);
       maptest.BoundStructMapSeqHelper.write (_out, seq);
       _in = _invoke (_out);
    } 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) {
       boundSeqMethod (seq);
    } finally {
        _releaseReply (_in);
    }
  } // boundSeqMethod

  public void arrayMethod (int[] array)
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("arrayMethod", true);
       maptest.IntArrayHelper.write (_out, array);
       _in = _invoke (_out);
    } 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) {
       arrayMethod (array);
    } finally {
        _releaseReply (_in);
    }
  } // arrayMethod

  public void intOutMethod (org.omg.CORBA.IntHolder intValue)
  {
    org.omg.CORBA.portable.InputStream _in = null;
    try {
       org.omg.CORBA.portable.OutputStream _out = _request ("intOutMethod", true);
       _out.write_long (intValue.value);
       _in = _invoke (_out);
       intValue.value = _in.read_long ();
    } 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) {
       intOutMethod (intValue);
    } finally {
        _releaseReply (_in);
    }
  } // intOutMethod

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:maptest/InterfaceName:1.0"};

  public String[] _ids ()
  {
    return (String[])__ids.clone ();
  }

  private void readObject (java.io.ObjectInputStream s)
  {
     try 
     {
       String str = s.readUTF ();
       org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str);
       org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
       _set_delegate (delegate);
     } catch (java.io.IOException e) {}
  }

  private void writeObject (java.io.ObjectOutputStream s)
  {
     try 
     {
       String str = org.omg.CORBA.ORB.init ().object_to_string (this);
       s.writeUTF (str);
     } catch (java.io.IOException e) {}
  }
} // class _InterfaceNameStub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -