agentland.resource
Interface Managed

All Known Subinterfaces:
AbstractDeviceManager, Beeper, Device, DeviceManager, DimmableLight, Drapes, DrapesManager, Exec, IR, Laurete, Light, LightManager, LynX10, ManualProjectionScreen, ManualProjector, Mess, MultiDevice, ProjectionScreen, ProjectionScreenMeta, ProjectionScreenSpeech, Projector, ResourceRetriever, TwoWayX10, X10, X10DimmableLight, X10Drapes, X10Light, X10ProjectionScreen
All Known Implementing Classes:
ManagedAgent

public interface Managed
extends Good


Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 float getNeed(String requestName)
          Asks the agent how badly it needs a given resource at a given time.
 void replace(Resource old_r, Resource new_r)
           
 Vector resources(Filter f)
          Get all resources used that match the given filter.
 void yank(ResourceBunch r)
           
 void yank(String requestName)
          Yank the resource bunch that was allocated in response to request with a particular name
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface agentland.util.Spy
tell
 

Method Detail

replace

public void replace(Resource old_r,
                    Resource new_r)
             throws RemoteException

yank

public void yank(ResourceBunch r)
          throws RemoteException

yank

public void yank(String requestName)
          throws RemoteException
Yank the resource bunch that was allocated in response to request with a particular name

getNeed

public float getNeed(String requestName)
              throws RemoteException
Asks the agent how badly it needs a given resource at a given time.
Parameters:
requestName - the name of the request (by which the agent obtained the resource in the first place)
Returns:
a number between 0 and 10 where 0 = not needed at all and 10 means desperately needed

resources

public Vector resources(Filter f)
                 throws RemoteException
Get all resources used that match the given filter. null filter means get all resources used.
Returns:
Vector of AgentIDs