01: /*
02: * JacORB - a free Java ORB
03: *
04: * Copyright (C) The JacORB project, 1997-2006.
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Library General Public
08: * License as published by the Free Software Foundation; either
09: * version 2 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Library General Public License for more details.
15: *
16: * You should have received a copy of the GNU Library General Public
17: * License along with this library; if not, write to the Free
18: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19: */
20:
21: package org.jacorb.orb.listener;
22:
23: import org.omg.CORBA.ORB;
24: import java.util.EventObject;
25:
26: /**
27: * <code>AcceptorExceptionEvent</code> defines an event state object for a
28: * Acceptor Exception events.
29: *
30: * @author Nick Cross
31: * @version $Id: AcceptorExceptionEvent.java,v 1.1 2006/06/26 08:08:24 alphonse.bendt Exp $
32: */
33: public class AcceptorExceptionEvent extends EventObject {
34: /**
35: * <code>orb</code> is a reference to the ORB.
36: */
37: private final ORB orb;
38:
39: /**
40: * <code>th</code> is the stack trace of the thrown exception.
41: */
42: private final Throwable th;
43:
44: /**
45: * Creates a new <code>AcceptorExceptionEvent</code> instance passing in the
46: * source of the event and relevant connection data.
47: *
48: * @param source an <code>Object</code> value
49: * @param orb an <code>ORB</code> value
50: * @param th a <code>Throwable</code> value
51: */
52: public AcceptorExceptionEvent(Object source, ORB orb, Throwable th) {
53: super (source);
54:
55: this .orb = orb;
56: this .th = th;
57: }
58:
59: /**
60: * <code>getORB</code> is an accessor for the ORB.
61: *
62: * @return a <code>ORB</code> value
63: */
64: public ORB getORB() {
65: return orb;
66: }
67:
68: /**
69: * <code>getException</code> is an accessor for the stack trace.
70: *
71: * @return a <code>Throwable</code> value
72: */
73: public Throwable getException() {
74: return th;
75: }
76:
77: /**
78: * Returns a String representation of this EventObject.
79: *
80: * @return A String representation of this EventObject.
81: */
82: public String toString() {
83: return (super .toString() + " with ORB " + orb + " and trace " + th
84: .toString());
85: }
86: }
|