KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > CORBA > portable > ApplicationException


1 /*
2  * @(#)ApplicationException.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 package org.omg.CORBA.portable;
9
10 /**
11 This class is used for reporting application level exceptions between ORBs and stubs.
12 */

13
14 public class ApplicationException extends Exception JavaDoc {
15     /**
16      * Constructs an ApplicationException from the CORBA repository ID of the exception
17      * and an input stream from which the exception data can be read as its parameters.
18      * @param id the repository id of the user exception
19      * @param ins the stream which contains the user exception data
20      */

21     public ApplicationException(String JavaDoc id,
22                 InputStream JavaDoc ins) {
23     this.id = id;
24     this.ins = ins;
25     }
26
27     /**
28      * Returns the CORBA repository ID of the exception
29      * without removing it from the exceptions input stream.
30      * @return The CORBA repository ID of this exception
31      */

32     public String JavaDoc getId() {
33     return id;
34     }
35
36     /**
37      * Returns the input stream from which the exception data can be read as its parameters.
38      * @return The stream which contains the user exception data
39      */

40     public InputStream JavaDoc getInputStream() {
41     return ins;
42     }
43
44     private String JavaDoc id;
45     private InputStream JavaDoc ins;
46 }
47
Popular Tags