Package com.streambase.sb.client
Class BaseClient
java.lang.Object
com.streambase.sb.client.BaseClient
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
StreamBaseAdminClient
,StreamBaseClient
The base class for the StreamBaseClient & StreamBaseAdminClient classes
-
Constructor Summary
ConstructorDescriptionBaseClient
(List<StreamBaseURI> uris, ClientSettings settings) Construct a BaseClient with the given URI -
Method Summary
Modifier and TypeMethodDescriptionabstract void
close()
Return the settings for this clientgetURI()
Return the URI used by this Client.getURIs()
get all of the URI's for this clientprotected boolean
haModeOn()
is HA mode onString[]
operatorStatus
(String containerName) Return the status of all the operators in the specified containerString[]
status()
Return the status of the StreamBase ServerString[]
status
(boolean verbose) Return the status of the StreamBase Server
-
Constructor Details
-
BaseClient
BaseClient(List<StreamBaseURI> uris, ClientSettings settings) throws StreamBaseException Construct a BaseClient with the given URI- Parameters:
uris
- list of URIs to usesettings
- settings- Throws:
StreamBaseException
- Node connection failed
-
-
Method Details
-
haModeOn
protected boolean haModeOn()is HA mode on- Returns:
- if HA mode is on
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
StreamBaseException
-
getSettings
Return the settings for this client- Returns:
- settings for this client
-
status
Return the status of the StreamBase Server- Returns:
- the status
- Throws:
StreamBaseException
- thrown on network and other errors
-
status
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
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
- error getting status
-
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
get all of the URI's for this client- Returns:
- all of the URI's for this client
-