1. /*
  2. * @(#)ExceptionHandler.java 1.4 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. package com.sun.corba.se.impl.presentation.rmi ;
  8. import org.omg.CORBA_2_3.portable.InputStream ;
  9. import org.omg.CORBA_2_3.portable.OutputStream ;
  10. import org.omg.CORBA.portable.ApplicationException ;
  11. public interface ExceptionHandler
  12. {
  13. /** Return true iff cls is an exception class that is
  14. * assignment compatible with an exception declared
  15. * on the method used to create this ExceptionHandler.
  16. */
  17. boolean isDeclaredException( Class cls ) ;
  18. /** Write the exception ex to os. ex must be assignment
  19. * compatible with an exception
  20. * declared on the method used to create this
  21. * ExceptionHandler.
  22. */
  23. void writeException( OutputStream os, Exception ex ) ;
  24. /** Read the exception contained in the InputStream
  25. * in the ApplicationException. If ae represents
  26. * an exception that is assignment compatible with
  27. * an exception on the method used to create this
  28. * exception handler, return the exception,
  29. * otherwise return an UnexpectedException wrapping
  30. * the exception in ae.
  31. */
  32. Exception readException( ApplicationException ae ) ;
  33. }