anthill.nest
Interface AntListener
- All Superinterfaces:
- java.rmi.Remote
- All Known Implementing Classes:
- LocalNest
- public interface AntListener
- extends java.rmi.Remote
This interface must be implemented by nests in order to receive
ants from other nests. The main method of the interface is
deliver()
. The interface is designed as a remote
interface (i.e., it extends Remote
and method
deliver()
delivers RemoteException
,
in order to enable the development of implementation based on
RMI. Note, however, that implementations of this class are not
required to be based on RMI.
- Version:
- $Revision$
- Author:
- Alberto Montresor
Method Summary |
void |
deliver(AntDescriptor desc)
This method is invoked to notify the ant listener that an ant
coming from the given nest has been received |
deliver
public void deliver(AntDescriptor desc)
throws java.rmi.RemoteException
- This method is invoked to notify the ant listener that an ant
coming from the given nest has been received
- Parameters:
sender
- the identifier of the nest from which this ant
has been receiveddesc
- the ant descriptor of the received ant- Throws:
java.rmi.RemoteException
- added to the throw clause to respect
the conventions for remote interfaces.