View Javadoc

1   /*
2    * @(#) RemoteContextListenerInterface.java Apr 14, 2004
3    * 
4    * Copyright (c) 2003 Delft University of Technology Jaffalaan 5, 2628 BX Delft,
5    * the Netherlands All rights reserved.
6    * 
7    * This software is proprietary information of Delft University of Technology
8    * The code is published under the General Public License
9    */
10  package nl.tudelft.simulation.naming.listener;
11  
12  import java.rmi.Remote;
13  import java.rmi.RemoteException;
14  
15  import javax.naming.event.NamingEvent;
16  import javax.naming.event.NamingExceptionEvent;
17  
18  /***
19   * A remoteInterface for the ContextListener.
20   * <p>
21   * (c) copyright 2003 <a href="http://www.simulation.tudelft.nl">Delft
22   * University of Technology </a>, the Netherlands. <br>
23   * See for project information <a
24   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
25   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
26   * License (GPL) </a>, no warranty <br>
27   * 
28   * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja/index.htm">Peter
29   *         Jacobs </a>
30   * @version 1.2 Apr 14, 2004
31   * @since 1.4
32   */
33  public interface RemoteContextListenerInterface extends Remote
34  {
35  	/***
36  	 * Called when an object has been added.
37  	 * <p>
38  	 * The binding of the newly added object can be obtained using
39  	 * <tt>evt.getNewBinding()</tt>.
40  	 * 
41  	 * @param evt The nonnull event.
42  	 * @see NamingEvent#OBJECT_ADDED
43  	 * @throws RemoteException on network failure
44  	 */
45  	public void objectAdded(NamingEvent evt) throws RemoteException;
46  
47  	/***
48  	 * Called when an object has been removed.
49  	 * <p>
50  	 * The binding of the newly removed object can be obtained using
51  	 * <tt>evt.getOldBinding()</tt>.
52  	 * 
53  	 * @param evt The nonnull event.
54  	 * @see NamingEvent#OBJECT_REMOVED
55  	 * @throws RemoteException on network failure
56  	 */
57  	public void objectRemoved(NamingEvent evt) throws RemoteException;
58  
59  	/***
60  	 * Called when an object has been renamed.
61  	 * <p>
62  	 * The binding of the renamed object can be obtained using
63  	 * <tt>evt.getNewBinding()</tt>. Its old binding (before the rename) can
64  	 * be obtained using <tt>evt.getOldBinding()</tt>. One of these may be
65  	 * null if the old/new binding was outside the scope in which the listener
66  	 * has registered interest.
67  	 * 
68  	 * @param evt The nonnull event.
69  	 * @see NamingEvent#OBJECT_RENAMED
70  	 * @throws RemoteException on network failure
71  	 */
72  	public void objectRenamed(NamingEvent evt) throws RemoteException;
73  
74  	/***
75  	 * Called when an object has been changed.
76  	 * <p>
77  	 * The binding of the changed object can be obtained using
78  	 * <tt>evt.getNewBinding()</tt>. Its old binding (before the change) can
79  	 * be obtained using <tt>evt.getOldBinding()</tt>.
80  	 * 
81  	 * @param evt The nonnull naming event.
82  	 * @see NamingEvent#OBJECT_CHANGED
83  	 * @throws RemoteException on network failure.
84  	 */
85  	public void objectChanged(NamingEvent evt) throws RemoteException;
86  
87  	/***
88  	 * Called when a naming exception is thrown while attempting to fire a
89  	 * <tt>NamingEvent</tt>.
90  	 * 
91  	 * @param evt The nonnull event.
92  	 * @throws RemoteException on network exception
93  	 * @throws RemoteException on network failure
94  	 */
95  	void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;
96  }