1 /* 2 * @(#)IndirectionException.java 1.14 03/12/19 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 /* 8 * Licensed Materials - Property of IBM 9 * RMI-IIOP v1.0 10 * Copyright IBM Corp. 1998 1999 All Rights Reserved 11 * 12 * US Government Users Restricted Rights - Use, duplication or 13 * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 14 */ 15 16 package org.omg.CORBA.portable; 17 18 import org.omg.CORBA.SystemException; 19 /** 20 * The Indirection exception is a Java specific system exception. 21 * It is thrown when the ORB's input stream is called to demarshal 22 * a value that is encoded as an indirection that is in the process 23 * of being demarshaled. This can occur when the ORB input stream 24 * calls the ValueHandler to demarshal an RMI value whose state 25 * contains a recursive reference to itself. Because the top-level 26 * ValueHandler.read_value() call has not yet returned a value, 27 * the ORB input stream's indirection table does not contain an entry 28 * for an object with the stream offset specified by the indirection 29 * tag. The stream offset is returned in the exception's offset field. 30 * @see org.omg.CORBA_2_3.portable.InputStream 31 * @see org.omg.CORBA_2_3.portable.OutputStream 32 */ 33 public class IndirectionException extends SystemException { 34 35 /** 36 * Points to the stream's offset. 37 */ 38 public int offset; 39 40 /** 41 * Creates an IndirectionException with the right offset value. 42 * The stream offset is returned in the exception's offset field. 43 * This exception is constructed and thrown during reading 44 * recursively defined values off of a stream. 45 * 46 * @param offset the stream offset where recursion is detected. 47 */ 48 public IndirectionException(int offset){ 49 super("", 0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 50 this.offset = offset; 51 } 52 } 53