KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > presentation > rmi > ExceptionHandler


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
8 package com.sun.corba.se.impl.presentation.rmi ;
9
10 import org.omg.CORBA_2_3.portable.InputStream JavaDoc ;
11 import org.omg.CORBA_2_3.portable.OutputStream JavaDoc ;
12
13 import org.omg.CORBA.portable.ApplicationException JavaDoc ;
14
15 public interface ExceptionHandler
16 {
17     /** Return true iff cls is an exception class that is
18      * assignment compatible with an exception declared
19      * on the method used to create this ExceptionHandler.
20      */

21     boolean isDeclaredException( Class JavaDoc cls ) ;
22
23     /** Write the exception ex to os. ex must be assignment
24      * compatible with an exception
25      * declared on the method used to create this
26      * ExceptionHandler.
27      */

28     void writeException( OutputStream JavaDoc os, Exception JavaDoc ex ) ;
29
30     /** Read the exception contained in the InputStream
31      * in the ApplicationException. If ae represents
32      * an exception that is assignment compatible with
33      * an exception on the method used to create this
34      * exception handler, return the exception,
35      * otherwise return an UnexpectedException wrapping
36      * the exception in ae.
37      */

38     Exception JavaDoc readException( ApplicationException JavaDoc ae ) ;
39 }
40
Popular Tags