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

📄 _servermanagerimplbase.java

📁 java1.6众多例子参考
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package com.sun.corba.se.PortableActivationIDL;


/**
* com/sun/corba/se/PortableActivationIDL/_ServerManagerImplBase.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Monday, July 21, 2008 1:27:48 AM GMT-08:00
*/


/** Interface used to combine the Activator and Locator when both are    * implemented together in the same process, as is currently the case    * for our implementation.    */
public abstract class _ServerManagerImplBase extends org.omg.CORBA.portable.ObjectImpl
                implements com.sun.corba.se.PortableActivationIDL.ServerManager, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors
  public _ServerManagerImplBase ()
  {
  }

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("registerServer", new java.lang.Integer (0));
    _methods.put ("serverGoingDown", new java.lang.Integer (1));
    _methods.put ("registerORB", new java.lang.Integer (2));
    _methods.put ("registerPOA", new java.lang.Integer (3));
    _methods.put ("poaDestroyed", new java.lang.Integer (4));
    _methods.put ("activate", new java.lang.Integer (5));
    _methods.put ("shutdown", new java.lang.Integer (6));
    _methods.put ("install", new java.lang.Integer (7));
    _methods.put ("uninstall", new java.lang.Integer (8));
    _methods.put ("getActiveServers", new java.lang.Integer (9));
    _methods.put ("getORBNames", new java.lang.Integer (10));
    _methods.put ("lookupPOATemplate", new java.lang.Integer (11));
    _methods.put ("locateServer", new java.lang.Integer (12));
    _methods.put ("locateServerForORB", new java.lang.Integer (13));
    _methods.put ("getEndpoint", new java.lang.Integer (14));
    _methods.put ("getServerPortForType", new java.lang.Integer (15));
  }

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

  /** A new ORB started server registers itself with the Activator	*/
       case 0:  // PortableActivationIDL/Activator/registerServer
       {
         try {
           String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
           com.sun.corba.se.PortableActivationIDL.ServerProxy serverObj = com.sun.corba.se.PortableActivationIDL.ServerProxyHelper.read (in);
           this.registerServer (serverId, serverObj);
           out = $rh.createReply();
         } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
         }
         break;
       }


  /** A server is shutting down that was started by this activator.	* Complete termination of the server is detected by the death of the	* process implementing the server.	*/
       case 1:  // PortableActivationIDL/Activator/serverGoingDown
       {
         String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
         this.serverGoingDown (serverId);
         out = $rh.createReply();
         break;
       }


  /** Called whenever an ORB instance is created.  This registers	* the transport endpoints and the ORB proxy callback object.	* Note that we cannot detect when an ORB shuts down, although	* all of the POA shutdowns should still be reported.	*/
       case 2:  // PortableActivationIDL/Activator/registerORB
       {
         try {
           String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
           String orbId = org.omg.PortableInterceptor.ORBIdHelper.read (in);
           com.sun.corba.se.PortableActivationIDL.ORBProxy orb = com.sun.corba.se.PortableActivationIDL.ORBProxyHelper.read (in);
           com.sun.corba.se.PortableActivationIDL.EndPointInfo endPointInfo[] = com.sun.corba.se.PortableActivationIDL.EndpointInfoListHelper.read (in);
           this.registerORB (serverId, orbId, orb, endPointInfo);
           out = $rh.createReply();
         } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
         } catch (com.sun.corba.se.PortableActivationIDL.NoSuchEndPoint $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.NoSuchEndPointHelper.write (out, $ex);
         } catch (com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegistered $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ORBAlreadyRegisteredHelper.write (out, $ex);
         }
         break;
       }


  /** Construct or find an ORBD object template corresponding to the 	* server's object template and return it.  Called whenever a 	* persistent POA is created.	*/
       case 3:  // PortableActivationIDL/Activator/registerPOA
       {
         String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
         String orbId = org.omg.PortableInterceptor.ORBIdHelper.read (in);
         org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read (in);
         org.omg.PortableInterceptor.ObjectReferenceTemplate $result = null;
         $result = this.registerPOA (serverId, orbId, poaTemplate);
         out = $rh.createReply();
         org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.write (out, $result);
         break;
       }


  /** Called whenever a POA is destroyed.	*/
       case 4:  // PortableActivationIDL/Activator/poaDestroyed
       {
         String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
         String orbId = org.omg.PortableInterceptor.ORBIdHelper.read (in);
         org.omg.PortableInterceptor.ObjectReferenceTemplate poaTemplate = org.omg.PortableInterceptor.ObjectReferenceTemplateHelper.read (in);
         this.poaDestroyed (serverId, orbId, poaTemplate);
         out = $rh.createReply();
         break;
       }


  /** If the server is not running, start it up.  This is allowed	* whether or not the server has been installed.	*/
       case 5:  // PortableActivationIDL/Activator/activate
       {
         try {
           String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
           this.activate (serverId);
           out = $rh.createReply();
         } catch (com.sun.corba.se.PortableActivationIDL.ServerAlreadyActive $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ServerAlreadyActiveHelper.write (out, $ex);
         } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
         } catch (com.sun.corba.se.PortableActivationIDL.ServerHeldDown $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ServerHeldDownHelper.write (out, $ex);
         }
         break;
       }


  /** If the server is running, shut it down	*/
       case 6:  // PortableActivationIDL/Activator/shutdown
       {
         try {
           String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
           this.shutdown (serverId);
           out = $rh.createReply();
         } catch (com.sun.corba.se.PortableActivationIDL.ServerNotActive $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ServerNotActiveHelper.write (out, $ex);
         } catch (com.sun.corba.se.PortableActivationIDL.ServerNotRegistered $ex) {
           out = $rh.createExceptionReply ();
           com.sun.corba.se.PortableActivationIDL.ServerNotRegisteredHelper.write (out, $ex);
         }
         break;
       }


  /** Invoke the server install hook.  If the server is not 	* currently running, this method will activate it.	*/
       case 7:  // PortableActivationIDL/Activator/install
       {
         try {
           String serverId = org.omg.PortableInterceptor.ServerIdHelper.read (in);
           this.install (serverId);
           out = $rh.createReply();

⌨️ 快捷键说明

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