public interface IDmClient extends IClient
The DM has one client for ALL the applications.
IClient.ListenerCommand| Modifier and Type | Method and Description |
|---|---|
void |
deleteMessagingServerArtifacts(net.roboconf.core.model.beans.Application application)
Deletes all the server artifacts related to this application.
|
void |
listenToAgentMessages(net.roboconf.core.model.beans.Application application,
IClient.ListenerCommand command)
Configures the listener for messages sent by agents.
|
void |
propagateAgentTermination(net.roboconf.core.model.beans.Application application,
net.roboconf.core.model.beans.Instance rootInstance)
Propagates to all the agents the fact that a given agent is not here anymore.
|
void |
sendMessageToAgent(net.roboconf.core.model.beans.Application application,
net.roboconf.core.model.beans.Instance instance,
Message message)
Sends a message to an agent.
|
closeConnection, isConnected, listenToTheDm, openConnection, sendMessageToTheDm, setMessageQueue, setParametersvoid sendMessageToAgent(net.roboconf.core.model.beans.Application application,
net.roboconf.core.model.beans.Instance instance,
Message message)
throws IOException
application - the application associated with the given agentinstance - an instance managed on the agent (used to find the root instance name)message - the message to sendIOException - if something went wrongvoid listenToAgentMessages(net.roboconf.core.model.beans.Application application,
IClient.ListenerCommand command)
throws IOException
application - the application associated with the given agentscommand - ListenerCommand#START to start listening, ListenerCommand#STOP to stop listeningIOException - if something went wrongvoid deleteMessagingServerArtifacts(net.roboconf.core.model.beans.Application application)
throws IOException
This method must be called when ALL the agents have closed their connection and BEFORE the DM's connection is closed.
application - the application whose messaging artifacts must be deletedIOException - if something went wrongvoid propagateAgentTermination(net.roboconf.core.model.beans.Application application,
net.roboconf.core.model.beans.Instance rootInstance)
throws IOException
Generally, when an agent undeploys something, it sends notifications to other agents, which themselves invoke their "update" method. However, when the DM terminates a virtual machine, the agent does not always send these notifications to the other agents. Therefore, the DM has to do it. Since it has the application model, it can do it.
The DM should notify all the potential agents that may be concerned. Roughly, it is equivalent to unpublishing all the exports of all the instances that were available on the terminated machine.
application - the application the agent is associated withrootInstance - the root instance associated with the agentIOException - if something went wrongCopyright © 2015. All rights reserved.