KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > dyade > aaa > jndi2 > impl > MissingRecordException


1 /**
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2001 - ScalAgent Distributed Technologies
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  *
20  * Initial developer(s): Sofiane Chibani
21  * Contributor(s): David Feliot, Nicolas Tachker
22  */

23 package fr.dyade.aaa.jndi2.impl;
24
25 import javax.naming.*;
26 import fr.dyade.aaa.jndi2.impl.*;
27
28 /**
29  * Thrown when a <code>ContextRecord</code> has not been found
30  * in a naming context. This may happen if the name asked in the
31  * JNDI request doesn't exist. That's why this exception includes
32  * a <code>NameNotFoundException</code> ready to be thrown forward.
33  * But the missing record may be resolved. For example,
34  * in a distributed configuration a missing record may indicate
35  * that the local JNDI server (where the record is missing) is not
36  * up to date according to a remote server where the record has
37  * been created. In this case, instead of throwing a
38  * <code>NameNotFoundException</code> the JNDI request
39  * may be blocked until the update arrives
40  * and creates the missing record.
41  */

42 public class MissingRecordException extends NamingException {
43
44   private NamingContextId namingContextId;
45
46   private Object JavaDoc ownerId;
47
48   private NameNotFoundException nnfe;
49
50   /**
51    * Constructs a <code>MissingRecordException</code>.
52    *
53    * @param namingContextId the identifier of the context where
54    * the record is missing.
55    *
56    * @param nnfe the naming exception to be thrown if the
57    * record really doesn't exist.
58    */

59   public MissingRecordException(
60     NamingContextId namingContextId,
61     Object JavaDoc ownerId,
62     NameNotFoundException nnfe) {
63     this.namingContextId = namingContextId;
64     this.ownerId = ownerId;
65     this.nnfe = nnfe;
66   }
67   
68   public final NamingContextId getNamingContextId() {
69     return namingContextId;
70   }
71
72   public final Object JavaDoc getOwnerId() {
73     return ownerId;
74   }
75
76   public final NameNotFoundException getNameNotFoundException() {
77     return nnfe;
78   }
79 }
80
Popular Tags