stella.net
Class ParameterClient

java.lang.Object
  extended by util.CommandLineParser
      extended by stella.net.ParameterClient

public class ParameterClient
extends CommandLineParser

A very simple class to test the functionality of a parameter server. On the command line, specify host name, port and name of the parameter. The string value, as returned from the server is echoed to System.out.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.CommandLineParser
CommandLineParser.Test
 
Field Summary
private static InetAddress DEFHOST
          The default server host.
private static int DEFPORT
          The default server port.
static String FOOT
          A footer usage message.
static String ONE
          The one-parameter switches understood.
static Map USE
          A human-readable description of the switches.
 
Constructor Summary
ParameterClient()
          Constructs a new parameter client.
 
Method Summary
static void main(String[] arg)
          Reads the name of the parameter to query and eventually the host name and the port from the command line and dumps the query result to System out.
 boolean process(String[] arg)
          Does both, parsing and processing of the command line switches.
 
Methods inherited from class util.CommandLineParser
getArguments, getCommandLine, getCommands, getRegisteredSwitches, hasAnySwitch, hasSwitch, hasSwitch, haveAllSwitches, parse, printCommandLine, registerLine, registerSwitches, setCommands, staticUsage, usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ONE

public static final String ONE
The one-parameter switches understood.

See Also:
Constant Field Values

USE

public static final Map USE
A human-readable description of the switches.


FOOT

public static final String FOOT
A footer usage message.

See Also:
Constant Field Values

DEFHOST

private static InetAddress DEFHOST
The default server host.


DEFPORT

private static final int DEFPORT
The default server port.

See Also:
Constant Field Values
Constructor Detail

ParameterClient

public ParameterClient()
Constructs a new parameter client. After construct, the client is ready for parsing the command line with CommandLineParser.parse(java.lang.String[]).

Method Detail

process

public boolean process(String[] arg)
                throws ParseException
Does both, parsing and processing of the command line switches.

Throws:
ParseException

main

public static void main(String[] arg)
                 throws ParseException
Reads the name of the parameter to query and eventually the host name and the port from the command line and dumps the query result to System out.

Throws:
ParseException