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[1];
         org.omg.CORBA.TypeCode _tcOf_members0 = null;
         _tcOf_members0 = org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_long);
         _tcOf_members0 =
             org.omg
                 .CORBA
                 .ORB
                 .init()
                 .create_alias_tc(
                     com.sun.corba.se.spi.activation.ServerIdHelper.id(),
                     "ServerId",
                     _tcOf_members0);
         _members0[0] = new org.omg.CORBA.StructMember("serverId", _tcOf_members0, null);
         __typeCode =
             org.omg
                 .CORBA
                 .ORB
                 .init()
                 .create_exception_tc(
                     com.sun.corba.se.spi.activation.ServerAlreadyUninstalledHelper.id(),
                     "ServerAlreadyUninstalled",
                     _members0);
         __active = false;
       }
     }
   }
   return __typeCode;
 }
Пример #2
0
  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()) {

        // always uninstalled.
      case 0: // activation/Repository/registerServer
        {
          try {
            com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef serverDef =
                com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.read(in);
            int $result = (int) 0;
            $result = this.registerServer(serverDef);
            out = $rh.createReply();
            out.write_long($result);
          } catch (com.sun.corba.se.spi.activation.ServerAlreadyRegistered $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerAlreadyRegisteredHelper.write(out, $ex);
          } catch (com.sun.corba.se.spi.activation.BadServerDefinition $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.BadServerDefinitionHelper.write(out, $ex);
          }
          break;
        }

        // unregister server definition
      case 1: // activation/Repository/unregisterServer
        {
          try {
            int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read(in);
            this.unregisterServer(serverId);
            out = $rh.createReply();
          } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write(out, $ex);
          }
          break;
        }

        // get server definition
      case 2: // activation/Repository/getServer
        {
          try {
            int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read(in);
            com.sun.corba.se.spi.activation.RepositoryPackage.ServerDef $result = null;
            $result = this.getServer(serverId);
            out = $rh.createReply();
            com.sun.corba.se.spi.activation.RepositoryPackage.ServerDefHelper.write(out, $result);
          } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write(out, $ex);
          }
          break;
        }

        // Return whether the server has been installed
      case 3: // activation/Repository/isInstalled
        {
          try {
            int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read(in);
            boolean $result = false;
            $result = this.isInstalled(serverId);
            out = $rh.createReply();
            out.write_boolean($result);
          } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write(out, $ex);
          }
          break;
        }

        // if the server is currently marked as installed.
      case 4: // activation/Repository/install
        {
          try {
            int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read(in);
            this.install(serverId);
            out = $rh.createReply();
          } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write(out, $ex);
          } catch (com.sun.corba.se.spi.activation.ServerAlreadyInstalled $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerAlreadyInstalledHelper.write(out, $ex);
          }
          break;
        }

        // if the server is currently marked as uninstalled.
      case 5: // activation/Repository/uninstall
        {
          try {
            int serverId = com.sun.corba.se.spi.activation.ServerIdHelper.read(in);
            this.uninstall(serverId);
            out = $rh.createReply();
          } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write(out, $ex);
          } catch (com.sun.corba.se.spi.activation.ServerAlreadyUninstalled $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerAlreadyUninstalledHelper.write(out, $ex);
          }
          break;
        }

        // list registered servers
      case 6: // activation/Repository/listRegisteredServers
        {
          int $result[] = null;
          $result = this.listRegisteredServers();
          out = $rh.createReply();
          com.sun.corba.se.spi.activation.ServerIdsHelper.write(out, $result);
          break;
        }

        // servers.
      case 7: // activation/Repository/getApplicationNames
        {
          String $result[] = null;
          $result = this.getApplicationNames();
          out = $rh.createReply();
          com.sun.corba.se.spi.activation.RepositoryPackage.StringSeqHelper.write(out, $result);
          break;
        }

        // Find the ServerID associated with the given application name.
      case 8: // activation/Repository/getServerID
        {
          try {
            String applicationName = in.read_string();
            int $result = (int) 0;
            $result = this.getServerID(applicationName);
            out = $rh.createReply();
            out.write_long($result);
          } catch (com.sun.corba.se.spi.activation.ServerNotRegistered $ex) {
            out = $rh.createExceptionReply();
            com.sun.corba.se.spi.activation.ServerNotRegisteredHelper.write(out, $ex);
          }
          break;
        }

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

    return out;
  } // _invoke