edu.csus.ecs.pc2.api

## Class BaseClient

- java.lang.Object
- - edu.csus.ecs.pc2.api.BaseClient

-     public abstract class BaseClient
      extends Object

  A Client using the API to login.
  Author:
    Douglas A. Lane

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected edu.csus.ecs.pc2.core.ParseArguments` | `bcParseArguments`
    `static String[]` | `REQUIRED_OPTIONS_LIST`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseClient()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOptions(String[] optionList)` Add additional command line options.
    `IContest` | `getContest()`
    `String[]` | `getOptionsWithParameter()` Command line options that have a parameter.
    `ServerConnection` | `getServerConnection()`
    `void` | `login(String[] args)` Login and perform onLoginAction().
    `abstract void` | `onLoginAction()` Upon successful login invokes this method.
    `abstract void` | `printProgramUsageInformation()` Print program usage information

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### bcParseArguments

          protected edu.csus.ecs.pc2.core.ParseArguments bcParseArguments

    - #### REQUIRED_OPTIONS_LIST

          public static final String[] REQUIRED_OPTIONS_LIST

  - ### Constructor Detail

    - #### BaseClient

          public BaseClient()

  - ### Method Detail

    - #### onLoginAction

          public abstract void onLoginAction()

      Upon successful login invokes this method.

    - #### printProgramUsageInformation

          public abstract void printProgramUsageInformation()

      Print program usage information

    - #### addOptions

          public void addOptions(String[] optionList)

      Add additional command line options.
      Parameters:
        `optionList` -

    - #### getContest

          public IContest getContest()

    - #### getServerConnection

          public ServerConnection getServerConnection()

    - #### getOptionsWithParameter

          public String[] getOptionsWithParameter()

      Command line options that have a parameter.
      Returns:

    - #### login

          public void login(String[] args)
                     throws LoginFailureException,
                            NotLoggedInException

      Login and perform onLoginAction().
      Parameters:
        `user` -
        `password` -
      Throws:
        `LoginFailureException`
        `NotLoggedInException`