Source for org.omg.PortableInterceptor.Current

   1: /* --
   2:    Copyright (C) 2005 Free Software Foundation, Inc.
   4: This file is part of GNU Classpath.
   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.
  11: GNU Classpath is distributed in the hope that it will be useful, but
  12: WITHOUT ANY WARRANTY; without even the implied warranty of
  14: General Public License for more details.
  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.
  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.
  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. */
  39: package org.omg.PortableInterceptor;
  41: import org.omg.CORBA.portable.IDLEntity;
  43: /**
  44:  * <p>
  45:  * The portable interceptor Current (PICurrent) contains multiple slots where an
  46:  * interceptor can rememeber the request - specific values between subsequent
  47:  * calls of the interceptor methods. In multithreaded environment, it is not
  48:  * possible just to store such data in the interceptor object fields.
  49:  * </p>
  50:  * <p>
  51:  * On the client side, it is possible to set the initial slot values by
  52:  * modifying slots on the Current, returend by ORB.resolve_initial_references
  53:  * ("PICurrent"). The returned value is narrowed with the
  54:  * {@link CurrentHelper#narrow}. On the subsequent invocation, made from the
  55:  * same thread, the interceptors will see the initial slot values as they were
  56:  * set using this approach.
  57:  * </p>
  58:  * <p>
  59:  * There are no way to set the initial values for the server side interceptors,
  60:  * the default values (Any with typecode TCKind.tk_null) should be always
  61:  * assumed.
  62:  * </p>
  63:  * <p>
  64:  * Since an Interceptor is running in a thread, it is running with a thread
  65:  * context and there is a PICurrent on that context. If the Interceptor calls
  66:  * ORB.resolve_initial_references ("PICurrent"), it gets the PICurrent within
  67:  * its thread scope. This PICurrent is different than the request scope
  68:  * PICurrent that the Interceptor obtains via calls to the Client- or Server-
  69:  * RequestInfo object.
  70:  * </p>
  71:  * <p>
  72:  * On the client side the PICurrent can be used to detect the recursive
  73:  * invocations, performed by interceptors. If one of the interceptors makes call
  74:  * via the same ORB, this call is then showed to all interceptors, including the
  75:  * interceptor that made it. To avoid infinite recursion, the during each call
  76:  * this interceptor can set some "recursion flag" into one of the slots of the
  77:  * PICurrent. If the flag is set on the entry point, this indicates a recursive
  78:  * call of that request.
  79:  * </p>
  80:  */
  81: public interface Current extends CurrentOperations,
  82:   org.omg.CORBA.Current,
  83:   IDLEntity
  84: {
  85: }