aea.registries.resources
This module contains the resources class.
Resources Objects
This class implements the object that holds the resources of an AEA.
__init__
Instantiate the resources.
Arguments:
agent_name: the name of the agent
agent_name
Get the agent name.
component_registry
Get the agent component registry.
behaviour_registry
Get the behaviour registry.
handler_registry
Get the handler registry.
model_registry
Get the model registry.
add_component
Add a component to resources.
add_protocol
Add a protocol to the set of resources.
Arguments:
protocol: a protocol
get_protocol
Get protocol for given protocol id.
Arguments:
protocol_id: the protocol id
Returns:
a matching protocol, if present, else None
get_protocol_by_specification_id
Get protocol for given protocol_specification_id.
Arguments:
protocol_specification_id: the protocol id
Returns:
a matching protocol, if present, else None
get_all_protocols
Get the list of all the protocols.
Returns:
the list of protocols.
remove_protocol
Remove a protocol from the set of resources.
Arguments:
protocol_id: the protocol id for the protocol to be removed.
add_contract
Add a contract to the set of resources.
Arguments:
contract: a contract
get_contract
Get contract for given contract id.
Arguments:
contract_id: the contract id
Returns:
a matching contract, if present, else None
get_all_contracts
Get the list of all the contracts.
Returns:
the list of contracts.
remove_contract
Remove a contract from the set of resources.
Arguments:
contract_id: the contract id for the contract to be removed.
add_connection
Add a connection to the set of resources.
Arguments:
connection: a connection
get_connection
Get connection for given connection id.
Arguments:
connection_id: the connection id
Returns:
a matching connection, if present, else None
get_all_connections
Get the list of all the connections.
Returns:
the list of connections.
remove_connection
Remove a connection from the set of resources.
Arguments:
connection_id: the connection id for the connection to be removed.
add_skill
Add a skill to the set of resources.
Arguments:
skill: a skill
get_skill
Get the skill for a given skill id.
Arguments:
skill_id: the skill id
Returns:
a matching skill, if present, else None
get_all_skills
Get the list of all the skills.
Returns:
the list of skills.
remove_skill
Remove a skill from the set of resources.
Arguments:
skill_id: the skill id for the skill to be removed.
get_handler
Get a specific handler.
Arguments:
protocol_id: the protocol id the handler is handlingskill_id: the skill id of the handler's skill
Returns:
the handler
get_handlers
Get all handlers for a given protocol.
Arguments:
protocol_id: the protocol id the handler is handling
Returns:
the list of handlers matching the protocol
get_all_handlers
Get all handlers from all skills.
Returns:
the list of handlers
get_behaviour
Get a specific behaviours for a given skill.
Arguments:
skill_id: the skill idbehaviour_name: the behaviour name
Returns:
the behaviour, if it is present, else None
get_behaviours
Get all behaviours for a given skill.
Arguments:
skill_id: the skill id
Returns:
the list of behaviours of the skill
get_all_behaviours
Get all behaviours from all skills.
Returns:
the list of all behaviours
setup
Set up the resources.
Calls setup on all resources.
teardown
Teardown the resources.
Calls teardown on all resources.