Source for org.omg.PortableServer.POAManagerOperations

   1: /* POAManagerOperations.java --
   2:    Copyright (C) 2005 Free Software Foundation, Inc.
   3: 
   4: This file is part of GNU Classpath.
   5: 
   6: GNU Classpath is free software; you can redistribute it and/or modify
   7: it under the terms of the GNU General Public License as published by
   8: the Free Software Foundation; either version 2, or (at your option)
   9: any later version.
  10: 
  11: GNU Classpath is distributed in the hope that it will be useful, but
  12: WITHOUT ANY WARRANTY; without even the implied warranty of
  13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14: General Public License for more details.
  15: 
  16: You should have received a copy of the GNU General Public License
  17: along with GNU Classpath; see the file COPYING.  If not, write to the
  18: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19: 02110-1301 USA.
  20: 
  21: Linking this library statically or dynamically with other modules is
  22: making a combined work based on this library.  Thus, the terms and
  23: conditions of the GNU General Public License cover the whole
  24: combination.
  25: 
  26: As a special exception, the copyright holders of this library give you
  27: permission to link this library with independent modules to produce an
  28: executable, regardless of the license terms of these independent
  29: modules, and to copy and distribute the resulting executable under
  30: terms of your choice, provided that you also meet, for each linked
  31: independent module, the terms and conditions of the license of that
  32: module.  An independent module is a module which is not derived from
  33: or based on this library.  If you modify this library, you may extend
  34: this exception to your version of the library, but you are not
  35: obligated to do so.  If you do not wish to do so, delete this
  36: exception statement from your version. */
  37: 
  38: 
  39: package org.omg.PortableServer;
  40: 
  41: import org.omg.PortableServer.POAManagerPackage.AdapterInactive;
  42: import org.omg.PortableServer.POAManagerPackage.State;
  43: 
  44: /**
  45:  * Defines the operations, applicable to the {@link POAManager}.
  46:  * These operations can turn the associated POAs to and from holding,
  47:  * active and discarding states, but the incative state is irreversible.
  48:  * The inactivated POAs can only be recreated after they were destroyed.
  49:  *
  50:  * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
  51:  */
  52: public interface POAManagerOperations
  53: {
  54:   /**
  55:    * Turns the associated POAs into active state, allowing them to receive
  56:    * and process requests.
  57:    *
  58:    * @throws AdapterInactive if the POAs are in the inactive state. If
  59:    * once inactivated, the POA cannot be activated again.
  60:    * This method can only be called to leave the holding or discarding state.
  61:    */
  62:   void activate()
  63:          throws AdapterInactive;
  64: 
  65:   /**
  66:    * <p>
  67:    * Turns the asociated POAs into inactive state. The POAs in the incative
  68:    * state will reject new requests. A cliet, trying to invoke an
  69:    * object, belonging to the inactivated POA, will receive the remote exception
  70:    * ({@link org.omg.CORBA.OBJ_ADAPTER}, minor code 0x535503ea, incomplete).
  71:    * </p><p>
  72:    * If the POA is once inactivated, it cannot be activated again.
  73:    * The operation is used when the associated POAs are to be shut down.
  74:    * </p>
  75:    * <p>
  76:    * Some independent implementations may set the minor code of the
  77:    * OBJ_ADAPTER to 1, as recommended by OMG (formal/04-03-12).
  78:    * The interoperable systems should expect any of these two values.
  79:    * </p>
  80:    *
  81:    * @param etherealize_objects if true, the servant managers of the
  82:    * associated POAs, having RETAIN and USE_SERVANT_MANAGER policies,
  83:    * will receive a call of {@link ServantActivatorOperations#etherealize}.
  84:    *
  85:    * @param wait_for_completion if true, the method call suspends the current
  86:    * thread till POAs complete the requests they are currently processing. If
  87:    * false, the method returns immediately.
  88:    * <p>
  89:    *
  90:    * @specnote The 0x535503ea is a Sun specific minor exception code 1002,
  91:    * used for interoperability reasons.
  92:    *
  93:    * @throws AdapterInactive if the POAs are already in the inactive state.
  94:    *
  95:    * @see POAOperations#destroy
  96:    */
  97:   void deactivate(boolean etherealize_objects, boolean wait_for_completion)
  98:            throws AdapterInactive;
  99: 
 100:   /**
 101:    * <p>
 102:    * Turns the associated POAs into discaring state. In this state, the POAs
 103:    * discard the incoming requests. This mode is used in situations when
 104:    * the server is flooded with requests. The client receives remote exception
 105:    * ({@link org.omg.CORBA.TRANSIENT}, minor code 0x535503e9, incomplete).
 106:    * </p><p>
 107:    * Some independent implementations may set the minor code of the
 108:    * TRANSIENT to 1, as recommended by OMG (formal/04-03-12).
 109:    * The interoperable systems should expect any of these two values.
 110:    * </p>
 111:    *
 112:    * @param wait_for_completion if true, the method call suspends the current
 113:    * thread till POAs complete the requests they are currently processing. If
 114:    * false, the method returns immediately.
 115:    *
 116:    * @specnote The 0x535503e9 is a Sun specific minor exception code 1001,
 117:    * used for interoperability reasons.
 118:    *
 119:    * @throws AdapterInactive if the POAs are in the inactive state.
 120:    */
 121:   void discard_requests(boolean wait_for_completion)
 122:                  throws AdapterInactive;
 123: 
 124:   /**
 125:    * Get the state of the POA manager.
 126:    */
 127:   State get_state();
 128: 
 129:   /**
 130:    * Turns the associated POAs into holding state. In this state, the POAs
 131:    * queue incoming requests but do not process them.
 132:    *
 133:    * @param wait_for_completion if true, the method call suspends the current
 134:    * thread till POAs complete the requests they are currently processing. If
 135:    * false, the method returns immediately.
 136: 
 137:    * @throws AdapterInactive if the POAs are in the inactive state.
 138:    */
 139:   void hold_requests(boolean wait_for_completion)
 140:               throws AdapterInactive;