|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|

Public Member Functions | |
| WhitePages () | |
| Constructor. | |
| Collection< MessageType > | getMsgTypes () |
| void | notifyIn (Message msg) |
| void | setQueue (Queue queue) |
| void | close () |
| This function needs to be called to make sure that all the sockets are properly closed. | |
| Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T > | |
| default void | notifyIn (Message msg, Object toAgent) |
| Notifies the listener of an incoming message. | |
Static Public Attributes | |
| static final MessageType | AGENT_REPORTED = MessageType.SYSTEM.newChild("WhitePages", "Agent-Reported") |
| Message used by white pages to notified the interested that an agent reported itself. | |
| static final MessageType | ALL_AGENTS_KILLED = MessageType.SYSTEM.newChild("WhitePages", "All-Agents-Killed") |
| Message used to tell the configuration Manager that all agents are killed. | |
| static final MessageType | DEAMONS_CONFIG_MSG = MessageType.SYSTEM.newChild("WhitePages", "Daemon-List") |
| The message containing the list of available daemons. | |
| static final MessageType | DEAMONS_LIST = MessageType.SYSTEM.newChild("WhitePages", "Daemon list") |
| Message containing the list of registered daemons for the user interface. | |
| static final MessageType | AGENTS_LIST = MessageType.SYSTEM.newChild("WhitePages", "Agent list") |
| Message containing the list of registered agents for the user interface. | |
| static final MessageType | CONNECT_AGENT = MessageType.SYSTEM.newChild("WhitePages", "Connect-Agent") |
| Message used to tell an agent to connect to its neighbours. | |
| static final MessageType | KILL_AGENTS = MessageType.SYSTEM.newChild("WhitePages", "Kill-Agents") |
| Message to signal to the daemon to kill agents. | |
| static final MessageType | AGENT_ADDRESS = MessageType.SYSTEM.newChild("WhitePages", "Agent-Address") |
| Message send to the local white pages that contains the address of an agent. | |
Package Attributes | |
| HashMap< String, AgentAddress > | daemons |
| The list of available daemons. | |
| HashMap< String, AgentAddress > | agents |
| The list of available agents. | |
| String | localAddress |
| The controllers IP address. | |
Private Attributes | |
| Queue | queue |
| The queue this listener belongs to. | |
| int | daemonCount |
| Counts the number of daemons that killed their agents. | |
| ArrayList< MessageType > | msgTypes = new ArrayList <MessageType> () |
| The list of messages types this listener wants to be notified of. | |
The white pages contains a list of the ip addresses of all agents and all daemons
| frodo2.controller.WhitePages.WhitePages | ( | ) |
Initialize both lists
References frodo2.daemon.LocalWhitePages.AGENT_ADDRESS_REQUEST, frodo2.controller.messages.MessageAgentReporting.AGENT_REPORTING, agents, frodo2.daemon.LocalWhitePages.AGENTS_KILLED, frodo2.controller.userIO.UserIO.AGENTS_LIST_REQUEST, frodo2.controller.ConfigurationManager.CONNECT, daemons, frodo2.controller.userIO.UserIO.DEAMON_LIST_REQUEST, frodo2.controller.messages.MessageAgentReporting.DEAMON_REPORTING, frodo2.controller.ConfigurationManager.KILL_ALL_AGENTS, localAddress, msgTypes, frodo2.controller.ConfigurationManager.REQUEST_DAEMONS_CONFIG_MSG, and frodo2.controller.ConfigurationManager.START.
| void frodo2.controller.WhitePages.close | ( | ) |
This function needs to be called to make sure that all the sockets are properly closed.
References agents, daemons, and queue.
Referenced by frodo2.daemon.TestLocalWhitePages.testLocalAgentAddressRequestUnknown().
| Collection< MessageType > frodo2.controller.WhitePages.getMsgTypes | ( | ) |
Implements frodo2.communication.MessageListener< T >.
References msgTypes.
| void frodo2.controller.WhitePages.notifyIn | ( | Message | msg | ) |
If the WhitePages know when to start the solving process, let it start
Implements frodo2.communication.IncomingMsgPolicyInterface< T >.
References AGENT_REPORTED, frodo2.controller.messages.MessageAgentReporting.AGENT_REPORTING, frodo2.controller.userIO.UserIO.AGENTS_LIST_REQUEST, frodo2.controller.userIO.UserIO.DEAMON_LIST_REQUEST, frodo2.communication.MessageType.equals(), notifyIn(), queue, and frodo2.controller.ConfigurationManager.REQUEST_DAEMONS_CONFIG_MSG.
Referenced by notifyIn().

| void frodo2.controller.WhitePages.setQueue | ( | Queue | queue | ) |
Implements frodo2.communication.MessageListener< T >.
References queue.
|
static |
Message send to the local white pages that contains the address of an agent.
Referenced by frodo2.daemon.LocalWhitePages.LocalWhitePages(), frodo2.daemon.LocalWhitePages.LocalWhitePages(), and frodo2.daemon.TestLocalWhitePages.testAgentAddress().
|
static |
Message used by white pages to notified the interested that an agent reported itself.
Referenced by frodo2.controller.ConfigurationManager.ConfigurationManager(), and notifyIn().
|
package |
The list of available agents.
Referenced by close(), frodo2.controller.TestWhitePages.WhitePagesExtention.getAgents(), and WhitePages().
|
static |
Message containing the list of registered agents for the user interface.
Referenced by frodo2.controller.userIO.UserIO.notifyIn(), and frodo2.controller.userIO.UserIO.UserIO().
|
static |
Message used to tell the configuration Manager that all agents are killed.
Referenced by frodo2.controller.ConfigurationManager.ConfigurationManager().
|
static |
Message used to tell an agent to connect to its neighbours.
Referenced by frodo2.algorithms.AgentFactory< V extends Addable< V >, U extends Addable< U > >.notifyIn(), frodo2.algorithms.SingleQueueAgent< Val extends Addable< Val > >.notifyIn(), frodo2.controller.TestConfigurationManager.SimpleDaemonListener.notifyIn(), and frodo2.controller.TestConfigurationManager.SimpleDaemonListener.SimpleDaemonListener().
|
private |
Counts the number of daemons that killed their agents.
|
package |
The list of available daemons.
Referenced by close(), frodo2.controller.TestWhitePages.WhitePagesExtention.getDaemons(), and WhitePages().
|
static |
The message containing the list of available daemons.
Referenced by frodo2.controller.ConfigurationManager.ConfigurationManager().
|
static |
Message containing the list of registered daemons for the user interface.
Referenced by frodo2.controller.userIO.UserIO.notifyIn(), and frodo2.controller.userIO.UserIO.UserIO().
|
static |
Message to signal to the daemon to kill agents.
Referenced by frodo2.daemon.LocalWhitePages.LocalWhitePages(), frodo2.daemon.LocalWhitePages.LocalWhitePages(), frodo2.controller.TestConfigurationManager.SimpleDaemonListener.notifyIn(), frodo2.controller.TestConfigurationManager.SimpleDaemonListener.SimpleDaemonListener(), frodo2.daemon.TestLocalWhitePages.testKillAgents(), and frodo2.daemon.userIO.UserIO.UserIO().
|
package |
The controllers IP address.
Referenced by WhitePages().
|
private |
The list of messages types this listener wants to be notified of.
Referenced by getMsgTypes(), and WhitePages().
|
private |
The queue this listener belongs to.
Referenced by close(), notifyIn(), and setQueue().