KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > corba > util > api > UserExceptionWrapper


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Philippe Merle.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.corba.util.api;
28
29 // Package dependencies.
30
import org.objectweb.util.misc.api.ExceptionWrapper;
31
32 /**
33  * This class encapsulates a CORBA::UserException exception
34  * allowing us to avoid to throw them in every operation sypnopsis.
35  *
36  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
37  *
38  * @version 0.1
39  */

40
41 public class UserExceptionWrapper
42      extends ExceptionWrapper
43   implements UserExceptionHolder
44 {
45     // ==================================================================
46
//
47
// Internal state.
48
//
49
// ==================================================================
50

51     // ==================================================================
52
//
53
// Constructors.
54
//
55
// ==================================================================
56

57     /** The default constructor. */
58     public
59     UserExceptionWrapper()
60     {
61         // Calls the ExceptionWrapper constructor.
62
super();
63     }
64
65     /**
66      * The constructor with the CORBA::UserException object to wrap.
67      *
68      * @param userException The CORBA::UserException object to wrap.
69      */

70     public
71     UserExceptionWrapper(org.omg.CORBA.UserException JavaDoc userException)
72     {
73         // Calls the ExceptionWrapper constructor.
74
super(userException);
75     }
76
77     /**
78      * The constructor with the CORBA::UserException object to wrap
79      * and a message.
80      *
81      * @param userException The CORBA::UserException object to wrap.
82      * @param message The message describing the exception.
83      */

84     public
85     UserExceptionWrapper(org.omg.CORBA.UserException JavaDoc userException,
86                          String JavaDoc message)
87     {
88         // Calls the ExceptionWrapper constructor.
89
super(userException, message);
90     }
91
92     // ==================================================================
93
//
94
// Internal methods.
95
//
96
// ==================================================================
97

98     // ==================================================================
99
//
100
// Public methods for org.objectweb.corba.util.api.UserExceptionHolder
101
//
102
// ==================================================================
103

104     /**
105      * Obtains the wrapped CORBA::UserException object.
106      *
107      * @return The wrapped CORBA::UserException object.
108      */

109     public org.omg.CORBA.UserException JavaDoc
110     getUserException()
111     {
112         return (org.omg.CORBA.UserException JavaDoc)getException();
113     }
114
115     /**
116      * Sets the wrapped CORBA::UserException object.
117      *
118      * @param userException The wrapped CORBA::UserException object.
119      */

120     public void
121     setUserException(org.omg.CORBA.UserException JavaDoc userException)
122     {
123         setException(userException);
124     }
125
126     // ==================================================================
127
//
128
// Other public methods.
129
//
130
// ==================================================================
131
}
132
Popular Tags