X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Futil%2Ffreenet%2Ffcp2%2FClientHello.java;fp=src%2Fde%2Ftodesbaum%2Futil%2Ffreenet%2Ffcp2%2FClientHello.java;h=0000000000000000000000000000000000000000;hb=38bdc433e50669e8244a63b5af59e597f88f1d29;hp=5983078db4fff953619ac50498b6257f05ffa396;hpb=f14b9fbe6d88e23920b10a75ebeba4d38390301b;p=jSite.git diff --git a/src/de/todesbaum/util/freenet/fcp2/ClientHello.java b/src/de/todesbaum/util/freenet/fcp2/ClientHello.java deleted file mode 100644 index 5983078..0000000 --- a/src/de/todesbaum/util/freenet/fcp2/ClientHello.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * jSite - ClientHello.java - Copyright © 2006–2012 David Roden - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package de.todesbaum.util.freenet.fcp2; - -import java.io.IOException; -import java.io.Writer; - -/** - * Implementation of the ClientHello command. This command must - * be sent as the first command on a connection ({@link de.todesbaum.util.freenet.fcp2.Connection#connect()} - * takes care of that) and must not be sent afterwards. - *

- * The node can answer with the following messages: NodeHello. - * - * @author David Roden <droden@gmail.com> - * @version $Id$ - */ -public class ClientHello extends Command { - - /** The name of the client. */ - protected String name; - - /** The version of the FCP protocol the client expects. */ - protected String expectedVersion = "2.0"; - - /** - * Creates a new ClientHello command. - */ - public ClientHello() { - super("ClientHello", "ClientHello-" + System.currentTimeMillis()); - } - - /** - * Returns the value of the ExpectedVersion parameter of this - * command. At the moment this value is not used by the node but in the - * future this may be used to enforce certain node versions. - * - * @return The expected version - */ - public String getExpectedVersion() { - return expectedVersion; - } - - /** - * Sets the value of the ExpectedVersion parameter of this - * command. At the moment this value is not used by the node but in the - * future this may be used to enforce certain node versions. - * - * @param expectedVersion - * The expected version - */ - public void setExpectedVersion(String expectedVersion) { - this.expectedVersion = expectedVersion; - } - - /** - * Returns the name of the client that is connecting. - * - * @return The name of the client - */ - public String getName() { - return name; - } - - /** - * Sets the name of the client that is connecting. - * - * @param name - * The name of the client - */ - public void setName(String name) { - this.name = name; - } - - /** - * {@inheritDoc} - */ - @Override - protected void write(Writer writer) throws IOException { - writer.write("Name=" + name + LINEFEED); - writer.write("ExpectedVersion=" + expectedVersion + LINEFEED); - } - -}