All Packages Class Hierarchy This Package Previous Next Index
Class connection.socket.Client
java.lang.Object
|
+----connection.socket.Client
- public abstract class Client
- extends Object
Client that connects to the Server using a socket over which it sends
Messages.
- Version:
- 0.30, 1998/04/01
- Author:
- FRED development team, Antti Viljamaa, Jukka Viljamaa
- See Also:
- Server, Message
-
connectionManager
- The connection manager.
-
DEFAULT_PORT
- The default port of the server.
-
host
- The host name of the server.
-
port
- The port of the server.
-
socket
- The socket and streams connected to it.
-
Client(String[])
- Constructs a new Client and processes command line arguments.
-
connect()
- Connects to the server.
-
createMessageHandlers(ConnectionManager, MessageHandler)
- Creates the message handlers for the client.
-
disconnect()
- Disconnects from the server.
-
getConnectionManager()
- Gets the connection manager.
-
getHost()
- Gets the host name of the server.
-
processCommandLine(String[])
- Processes the command line arguments of the client.
-
setConnectionManager(ConnectionManager)
- Sets the connection manager.
-
setHost(String)
- Sets the host name of the server.
-
setStatus(String)
- Sets the status string of the client.
-
usage()
- Prints usage information.
connectionManager
private ConnectionManager connectionManager
- The connection manager.
DEFAULT_PORT
public static final int DEFAULT_PORT
- The default port of the server.
port
private static int port
- The port of the server.
host
private static String host
- The host name of the server.
socket
private Socket socket
- The socket and streams connected to it.
Client
public Client(String args[])
- Constructs a new Client and processes command line arguments.
- Parameters:
- args - The command line arguments. Usage:
java Client
[[hostname] port]
.
- args - Command line arguments.
setStatus
public abstract void setStatus(String txt)
- Sets the status string of the client.
createMessageHandlers
public abstract MessageHandler createMessageHandlers(ConnectionManager connectionManager,
MessageHandler rootHandler)
- Creates the message handlers for the client.
processCommandLine
protected void processCommandLine(String args[])
- Processes the command line arguments of the client.
- Parameters:
- args - The command line arguments.
"Usage: java Client [[hostname] port]"
usage
protected void usage()
- Prints usage information.
connect
public void connect()
- Connects to the server.
disconnect
public void disconnect()
- Disconnects from the server.
getHost
public static String getHost()
- Gets the host name of the server.
setHost
public static void setHost(String s)
- Sets the host name of the server.
getConnectionManager
public ConnectionManager getConnectionManager()
- Gets the connection manager.
setConnectionManager
public void setConnectionManager(ConnectionManager ml)
- Sets the connection manager.
All Packages Class Hierarchy This Package Previous Next Index