jxtaimpl
Class RequestSet

java.lang.Object
  |
  +--jxtaimpl.RequestSet
All Implemented Interfaces:
Clearable, RequestSet

public class RequestSet
extends Object
implements RequestSet

This class maps RequestIds to appropriate ResponseListeners

Author:
Francesco Russo (frusso@cs.unibo.it)

Field Summary
 
Fields inherited from interface anthill.nest.RequestSet
NAME
 
Constructor Summary
RequestSet()
          This is the default constructor
 
Method Summary
 void add(RequestId rId, ResponseListener rLstn)
          Add a new entry
 void clear()
          Bring this object's initial state back
 boolean returnResources(RequestId rId, Resource[] res)
          Return the specified array of resources to the listener associated with the given RequestId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestSet

public RequestSet()
This is the default constructor

Method Detail

add

public void add(RequestId rId,
                ResponseListener rLstn)
Add a new entry

Specified by:
add in interface RequestSet
Parameters:
rId - the key that will be used later to obtain the listener
rLstn - the listener which will be notified when a response is available

returnResources

public boolean returnResources(RequestId rId,
                               Resource[] res)
Return the specified array of resources to the listener associated with the given RequestId

Specified by:
returnResources in interface RequestSet
Parameters:
rId - the key that is used to obtain listener
res - the resources found.

clear

public void clear()
Bring this object's initial state back

Specified by:
clear in interface Clearable