/**
* TODO
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public class NodeManager implements Iterable<Node>, PropertyChangeListener, HighLevelClientListener {
/**
* Creates a new FCP collector.
- *
+ *
* @param clientName
* The name of the FCP client
* @param directory
/**
* Adds the given listener to the list of listeners.
- *
+ *
* @param nodeListener
* The listener to add
*/
/**
* Removes the given listener from the list of listeners.
- *
+ *
* @param nodeListener
* The listener to remove
*/
/**
* Notifies all listeners that a node was added.
- *
+ *
* @param node
* The node that was added.
*/
/**
* Notifies all listeners that a node was removed.
- *
+ *
* @param node
* The node that was removed
*/
/**
* Notifies all listeners that the given node was connected.
- *
+ *
* @param node
* The node that is now connected
*/
/**
* Notifies all listeners that a connection to a node has failed.
- *
+ *
* @param node
* The node that could not be connected
* @param cause
/**
* Notifies all listeners that the given node was disconnected.
- *
+ *
* @param node
* The node that is now disconnected
* @param throwable
/**
* Returns the directory in which the nodes are stored.
- *
+ *
* @return The directory the nodes are stored in
*/
public String getDirectory() {
/**
* Checks whether the given node is already connected.
- *
+ *
* @param node
* The node to check
* @return <code>true</code> if the node is already connected,
/**
* Loads nodes.
- *
+ *
* @throws IOException
* if an I/O error occurs loading the nodes
*/
/**
* Saves all configured nodes.
- *
+ *
* @throws IOException
* if an I/O error occurs saving the nodes
*/
/**
* Adds the given node to this manager.
- *
+ *
* @see #connect(Node)
* @param node
* The node to connect to
/**
* Removes the given node from the node manager, disconnecting it if it is
* currently connected.
- *
+ *
* @param node
* The node to remove
*/
/**
* Tries to establish a connection with the given node.
- *
+ *
* @param node
* The node to connect to
*/
/**
* Disconnects the given node without removing it.
- *
+ *
* @param node
* The node to disconnect
*/
/**
* Returns a list of all nodes.
- *
+ *
* @return A list of all nodes
*/
public List<Node> getNodes() {
/**
* Returns the high-level client for a given node.
- *
+ *
* @param node
* The node to get a high-level client for
* @return The high-level client for a node, or <code>null</code> if the
/**
* Returns the node for a high-level client.
- *
+ *
* @param highLevelClient
* The high-level client to get the node for
* @return The node for the high-level client, or <code>null</code> if the
/**
* Returns the node identified by the given ID.
- *
+ *
* @param id
* The ID of the node
* @return The node with the given ID, or <code>null</code> if no such
/**
* Generates a new SSK key pair.
- *
+ *
* @return An array with the private key at index <code>0</code> and the
* public key at index <code>1</code>
* @throws IOException