zeus.actors
Interface ExternalDb


public interface ExternalDb

If an agent needs a resource it will first examine its local resource database, and if the necessary Fact is not present it then will consult its external resource database (if it has one). These external resource databases are linked to Zeus agents through this interface class, allowing the developer to encapsulate an external system like a database in a way that can still be accessed by the agent.

Details on how to use this interface are provided in Section 6 of the Zeus Application Realisation Guide. ISSUES We are likely to want to connect more than one external interface to each agent - this interface doesn't provide for that so we need to do something about it .....


Method Summary
 java.util.Enumeration all(Fact f1)
          Implements a query operation that should return an enumeration of all facts that match the parameter; this is not assumed to be destructive
 boolean contains(Fact f1)
          Implements a membership operation, returning true if the fact parameter currently exists within the external resource
 boolean put(Fact f1)
          Implements an insertion operation, returning true if the fact parameter was successfully inserted.
 Fact remove(Fact f1)
          Implements a retrieval operation that returns the fact matching the the parameter; this is assumed to be destructive
 void set(AgentContext context)
          A configuration method, used to associate the external resource with its owner agent.
 

Method Detail

set

public void set(AgentContext context)
A configuration method, used to associate the external resource with its owner agent.


contains

public boolean contains(Fact f1)
Implements a membership operation, returning true if the fact parameter currently exists within the external resource


put

public boolean put(Fact f1)
Implements an insertion operation, returning true if the fact parameter was successfully inserted. Whether duplicates are permitted is at the discretion of the external resource that implements this service.


remove

public Fact remove(Fact f1)
Implements a retrieval operation that returns the fact matching the the parameter; this is assumed to be destructive


all

public java.util.Enumeration all(Fact f1)
Implements a query operation that should return an enumeration of all facts that match the parameter; this is not assumed to be destructive



Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.