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()) {

        // bind initial name
      case 0: // activation/InitialNameService/bind
        {
          try {
            String name = in.read_string();
            org.omg.CORBA.Object obj = org.omg.CORBA.ObjectHelper.read(in);
            boolean isPersistant = in.read_boolean();
            this.bind(name, obj, isPersistant);
            out = $rh.createReply();
          } catch (com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBound $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBoundHelper.write(
                out, $ex);
          }
          break;
        }

      default:
        throw new org.omg.CORBA.BAD_OPERATION(0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke
Esempio n. 2
0
 public static synchronized org.omg.CORBA.TypeCode type() {
   if (__typeCode == null) {
     synchronized (org.omg.CORBA.TypeCode.class) {
       if (__typeCode == null) {
         if (__active) {
           return org.omg.CORBA.ORB.init().create_recursive_tc(_id);
         }
         __active = true;
         org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[0];
         org.omg.CORBA.TypeCode _tcOf_members0 = null;
         __typeCode =
             org.omg
                 .CORBA
                 .ORB
                 .init()
                 .create_exception_tc(
                     com.sun.corba.se.spi.activation.InitialNameServicePackage
                         .NameAlreadyBoundHelper.id(),
                     "NameAlreadyBound",
                     _members0);
         __active = false;
       }
     }
   }
   return __typeCode;
 }
 // bind initial name
 public void bind(String name, org.omg.CORBA.Object obj, boolean isPersistant)
     throws com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBound {
   org.omg.CORBA.portable.InputStream $in = null;
   try {
     org.omg.CORBA.portable.OutputStream $out = _request("bind", true);
     $out.write_string(name);
     org.omg.CORBA.ObjectHelper.write($out, obj);
     $out.write_boolean(isPersistant);
     $in = _invoke($out);
     return;
   } catch (org.omg.CORBA.portable.ApplicationException $ex) {
     $in = $ex.getInputStream();
     String _id = $ex.getId();
     if (_id.equals("IDL:activation/InitialNameService/NameAlreadyBound:1.0"))
       throw com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBoundHelper.read(
           $in);
     else throw new org.omg.CORBA.MARSHAL(_id);
   } catch (org.omg.CORBA.portable.RemarshalException $rm) {
     bind(name, obj, isPersistant);
   } finally {
     _releaseReply($in);
   }
 } // bind
 public org.omg.CORBA.TypeCode _type() {
   return com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBoundHelper.type();
 }
 public void _write(org.omg.CORBA.portable.OutputStream o) {
   com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBoundHelper.write(
       o, value);
 }
 public void _read(org.omg.CORBA.portable.InputStream i) {
   value =
       com.sun.corba.se.spi.activation.InitialNameServicePackage.NameAlreadyBoundHelper.read(i);
 }