public interface IAgentClient extends IClient
Each agent must have its own and unique client.
IClient.ListenerCommand| Modifier and Type | Method and Description |
|---|---|
void |
listenToExportsFromOtherAgents(IClient.ListenerCommand command,
net.roboconf.core.model.beans.Instance instance)
Configures the listener for the exports from other agents.
|
void |
listenToRequestsFromOtherAgents(IClient.ListenerCommand command,
net.roboconf.core.model.beans.Instance instance)
Configures the listener for requests from other agents.
|
void |
publishExports(net.roboconf.core.model.beans.Instance instance)
Publishes the exports for a given instance.
|
void |
publishExports(net.roboconf.core.model.beans.Instance instance,
String facetOrComponentName)
Publishes specific exports for a given instance.
|
void |
requestExportsFromOtherAgents(net.roboconf.core.model.beans.Instance instance)
Requests other agents to export their variables on the messaging server.
|
void |
setApplicationName(String applicationName)
Sets the application name.
|
void |
setRootInstanceName(String rootInstanceName)
Sets the name of the root instance associated with the agent.
|
void |
unpublishExports(net.roboconf.core.model.beans.Instance instance)
Un-publishes the exports for a given instance.
|
closeConnection, isConnected, listenToTheDm, openConnection, sendMessageToTheDm, setMessageQueue, setParametersvoid setApplicationName(String applicationName)
void setRootInstanceName(String rootInstanceName)
void publishExports(net.roboconf.core.model.beans.Instance instance)
throws IOException
This method indicates to other instances that they can use the variables exported by THIS instance.
instance - the instance whose exports must be publishedIOException - if something went wrongvoid publishExports(net.roboconf.core.model.beans.Instance instance,
String facetOrComponentName)
throws IOException
instance - the instance whose exports must be publishedfacetOrComponentName - the prefix of the variables to publishIOException - if something went wrongvoid unpublishExports(net.roboconf.core.model.beans.Instance instance)
throws IOException
This method indicates to other instances that the variables exported by THIS instance cannot be used anymore.
instance - the instance whose exports must be publishedIOException - if something went wrongvoid listenToRequestsFromOtherAgents(IClient.ListenerCommand command, net.roboconf.core.model.beans.Instance instance) throws IOException
Such requests aim at asking an agent to publish its exports. The agent will do so only if it exports a variable prefixed that is required by THIS instance.
command - ListenerCommand#START to start listening, ListenerCommand#STOP to stop listeninginstance - the instance that need exports from other agentsIOException - if something went wrongvoid requestExportsFromOtherAgents(net.roboconf.core.model.beans.Instance instance)
throws IOException
This should be called when a new instance is registered on the agent. It guarantees that any new instance can be notified about the instances located on other agents.
instance - the instance that need exports from other agentsIOException - if something went wrongvoid listenToExportsFromOtherAgents(IClient.ListenerCommand command, net.roboconf.core.model.beans.Instance instance) throws IOException
command - ListenerCommand#START to start listening, ListenerCommand#STOP to stop listeninginstance - the instance that determine which exports must be listened toIOException - if something went wrongCopyright © 2015. All rights reserved.