public class Client
extends java.lang.Object
Constructor and Description |
---|
Client(java.lang.String host,
int port)
Create a Client for the given server.
|
Client(java.lang.String host,
int port,
java.lang.ClassLoader classLoader)
Create a Client for the given server.
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
Connect to the server
|
void |
disconnect()
Disconnect from the server
|
java.lang.String |
getHost() |
int |
getPort() |
java.lang.String |
getVersion()
Returns the user-defined version of the client
|
void |
sendCommand(Command command)
Sends a command object to the server.
|
void |
setVersion(java.lang.String version)
Sets the version of the client.
|
public Client(java.lang.String host, int port)
host
- The server hostport
- The server portpublic Client(java.lang.String host, int port, java.lang.ClassLoader classLoader)
host
- The server hostport
- The server portclassLoader
- The classloader to use for serialization of command-beanspublic void connect() throws RemoteException
RemoteException
public void disconnect() throws RemoteException, CommandException
RemoteException
CommandException
public void sendCommand(Command command) throws RemoteException, CommandException
command
- The command object.RemoteException
CommandException
public void setVersion(java.lang.String version)
version
- A user defined version string.public java.lang.String getVersion()
public java.lang.String getHost()
public int getPort()