corba/src/share/classes/com/sun/corba/se/impl/activation/ServerMain.java

Print this page
rev 505 : 7201066: Change modifiers on unused fields
Reviewed-by: alanb, skoivu
   1 /*
   2  * Copyright (c) 1997, 2002, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 305         ServerCallback serverObj = new ServerCallback( orb,
 306             installMethod, uninstallMethod, shutdownMethod ) ;
 307 
 308         int serverId = getServerId() ;
 309 
 310         try {
 311             Activator activator = ActivatorHelper.narrow(
 312                 orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME ));
 313             activator.active(serverId, serverObj);
 314         } catch (Exception ex) {
 315             logTerminal( "exception " + ex.getMessage(),
 316                 REGISTRATION_FAILED ) ;
 317         }
 318     }
 319 }
 320 
 321 class ServerCallback extends
 322     com.sun.corba.se.spi.activation._ServerImplBase
 323 {
 324     private ORB orb;
 325     private Method installMethod ;
 326     private Method uninstallMethod ;
 327     private Method shutdownMethod ;
 328     private Object methodArgs[] ;
 329 
 330     ServerCallback(ORB orb, Method installMethod, Method uninstallMethod,
 331         Method shutdownMethod )
 332     {
 333         this.orb = orb;
 334         this.installMethod = installMethod ;
 335         this.uninstallMethod = uninstallMethod ;
 336         this.shutdownMethod = shutdownMethod ;
 337 
 338         orb.connect( this ) ;
 339 
 340         methodArgs = new Object[] { orb } ;
 341     }
 342 
 343     private void invokeMethod( Method method )
 344     {
 345         if (method != null)
 346             try {
 347                 method.invoke( null, methodArgs ) ;


   1 /*
   2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 305         ServerCallback serverObj = new ServerCallback( orb,
 306             installMethod, uninstallMethod, shutdownMethod ) ;
 307 
 308         int serverId = getServerId() ;
 309 
 310         try {
 311             Activator activator = ActivatorHelper.narrow(
 312                 orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME ));
 313             activator.active(serverId, serverObj);
 314         } catch (Exception ex) {
 315             logTerminal( "exception " + ex.getMessage(),
 316                 REGISTRATION_FAILED ) ;
 317         }
 318     }
 319 }
 320 
 321 class ServerCallback extends
 322     com.sun.corba.se.spi.activation._ServerImplBase
 323 {
 324     private ORB orb;
 325     private transient Method installMethod ;
 326     private transient Method uninstallMethod ;
 327     private transient Method shutdownMethod ;
 328     private Object methodArgs[] ;
 329 
 330     ServerCallback(ORB orb, Method installMethod, Method uninstallMethod,
 331         Method shutdownMethod )
 332     {
 333         this.orb = orb;
 334         this.installMethod = installMethod ;
 335         this.uninstallMethod = uninstallMethod ;
 336         this.shutdownMethod = shutdownMethod ;
 337 
 338         orb.connect( this ) ;
 339 
 340         methodArgs = new Object[] { orb } ;
 341     }
 342 
 343     private void invokeMethod( Method method )
 344     {
 345         if (method != null)
 346             try {
 347                 method.invoke( null, methodArgs ) ;