- public FcpClient(String name, InetAddress host, int port) {
- this.name = name;
- fcpConnection = new FcpConnection(host, port);
+ public FcpClient(InetAddress host, int port) {
+ this(new FcpConnection(host, port));
+ }
+
+ /**
+ * Creates a new high-level FCP client that will use the given connection.
+ * This constructor will assume that the FCP connection is already
+ * connected.
+ *
+ * @param fcpConnection
+ * The FCP connection to use
+ */
+ public FcpClient(FcpConnection fcpConnection) {
+ this(fcpConnection, true);
+ }
+
+ /**
+ * Creates a new high-level FCP client that will use the given connection.
+ *
+ * @param fcpConnection
+ * The FCP connection to use
+ * @param connected
+ * The initial status of the FCP connection
+ */
+ public FcpClient(FcpConnection fcpConnection, boolean connected) {
+ this.fcpConnection = fcpConnection;
+ this.connected = connected;