com.streambase.sb.client

## Class BaseClient

- java.lang.Object
- - com.streambase.sb.client.BaseClient

- All Implemented Interfaces:
    AutoCloseable
  Direct Known Subclasses:
    StreamBaseAdminClient, StreamBaseClient

      abstract class BaseClient
      extends Object
      implements AutoCloseable

  The base class for the StreamBaseClient & StreamBaseAdminClient classes

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseClient(List<StreamBaseURI> uris, ClientSettings settings)` Construct a BaseClient with the given URI

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `close()` close the client
    `ClientSettings` | `getSettings()` Return the settings for this client
    `StreamBaseURI` | `getURI()` Return the URI used by this Client.
    `List<StreamBaseURI>` | `getURIs()` get all of the URI's for this client
    `protected boolean` | `haModeOn()` is HA mode on
    `String[]` | `operatorStatus(String containerName)` Return the status of all the operators in the specified container
    `String[]` | `status()` Return the status of the StreamBase Server
    `String[]` | `status(boolean verbose)` Return the status of the StreamBase Server

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

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

- - ### Constructor Detail

    - #### BaseClient

          BaseClient(List<StreamBaseURI> uris,
                     ClientSettings settings)
              throws StreamBaseException

      Construct a BaseClient with the given URI
      Parameters:
        `uris` - list of URIs to use
        `settings` - settings
      Throws:
        `StreamBaseException` - Node connection failed

  - ### Method Detail

    - #### haModeOn

          protected boolean haModeOn()

      is HA mode on
      Returns:
        if HA mode is on

    - #### close

          public abstract void close()
                              throws StreamBaseException

      close the client
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `StreamBaseException`

    - #### getSettings

          public ClientSettings getSettings()

      Return the settings for this client
      Returns:
        settings for this client

    - #### status

          public String[] status()
                          throws StreamBaseException

      Return the status of the StreamBase Server
      Returns:
        the status
      Throws:
        `StreamBaseException` - thrown on network and other errors

    - #### status

          public String[] status(boolean verbose)
                          throws StreamBaseException

      Return the status of the StreamBase Server
      Parameters:
        `verbose` - return a verbose status
      Returns:
        the status
      Throws:
        `StreamBaseException` - thrown on network and other errors

    - #### operatorStatus

          public String[] operatorStatus(String containerName)
                                  throws StreamBaseException

      Return the status of all the operators in the specified container
      Parameters:
        `containerName` - the name of the container
      Returns:
        an array of strings of the form "operatorname=status"
      Throws:
        `StreamBaseException`

    - #### getURI

          public StreamBaseURI getURI()

      Return the URI used by this Client. In HA mode this just returns the 1st URI for the client
      Returns:
        the uri for this client

    - #### getURIs

          public List<StreamBaseURI> getURIs()

      get all of the URI's for this client
      Returns:
        all of the URI's for this client

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.