nl.tudelft.simulation.naming.listener
Class RemoteContextListener

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by nl.tudelft.simulation.naming.listener.RemoteContextListener
All Implemented Interfaces:
Serializable, Remote, RemoteContextListenerInterface

public class RemoteContextListener
extends UnicastRemoteObject
implements RemoteContextListenerInterface

A RemoteContextListener.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.4
Version:
1.2 Apr 14, 2004
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteContextListener(ContextListenerInterface listener)
          constructs a new RemoteContextListener
 
Method Summary
 void namingExceptionThrown(NamingExceptionEvent evt)
          Called when a naming exception is thrown while attempting to fire a NamingEvent.
 void objectAdded(NamingEvent evt)
          Called when an object has been added.
 void objectChanged(NamingEvent evt)
          Called when an object has been changed.
 void objectRemoved(NamingEvent evt)
          Called when an object has been removed.
 void objectRenamed(NamingEvent evt)
          Called when an object has been renamed.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteContextListener

public RemoteContextListener(ContextListenerInterface listener)
                      throws RemoteException
constructs a new RemoteContextListener

Parameters:
listener - the target.
Throws:
RemoteException - on network failure.
Method Detail

objectChanged

public void objectChanged(NamingEvent evt)
Description copied from interface: RemoteContextListenerInterface
Called when an object has been changed.

The binding of the changed object can be obtained using evt.getNewBinding(). Its old binding (before the change) can be obtained using evt.getOldBinding().

Specified by:
objectChanged in interface RemoteContextListenerInterface
Parameters:
evt - The nonnull naming event.
See Also:
#objectChanged(javax.naming.event.NamingEvent)

objectAdded

public void objectAdded(NamingEvent evt)
Description copied from interface: RemoteContextListenerInterface
Called when an object has been added.

The binding of the newly added object can be obtained using evt.getNewBinding().

Specified by:
objectAdded in interface RemoteContextListenerInterface
Parameters:
evt - The nonnull event.
See Also:
RemoteContextListenerInterface.objectAdded(javax.naming.event.NamingEvent)

objectRemoved

public void objectRemoved(NamingEvent evt)
Description copied from interface: RemoteContextListenerInterface
Called when an object has been removed.

The binding of the newly removed object can be obtained using evt.getOldBinding().

Specified by:
objectRemoved in interface RemoteContextListenerInterface
Parameters:
evt - The nonnull event.
See Also:
RemoteContextListenerInterface.objectRemoved(javax.naming.event.NamingEvent)

objectRenamed

public void objectRenamed(NamingEvent evt)
Description copied from interface: RemoteContextListenerInterface
Called when an object has been renamed.

The binding of the renamed object can be obtained using evt.getNewBinding(). Its old binding (before the rename) can be obtained using evt.getOldBinding(). One of these may be null if the old/new binding was outside the scope in which the listener has registered interest.

Specified by:
objectRenamed in interface RemoteContextListenerInterface
Parameters:
evt - The nonnull event.
See Also:
RemoteContextListenerInterface.objectRenamed(javax.naming.event.NamingEvent)

namingExceptionThrown

public void namingExceptionThrown(NamingExceptionEvent evt)
Description copied from interface: RemoteContextListenerInterface
Called when a naming exception is thrown while attempting to fire a NamingEvent.

Specified by:
namingExceptionThrown in interface RemoteContextListenerInterface
Parameters:
evt - The nonnull event.
See Also:
#namingExceptionThrown(javax.naming.event.NamingExceptionEvent)


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.