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