T
- type of result retrieved using this HTTP connectionpublic class JDKConnection<T> extends Object implements Connection<T>
Constructor and Description |
---|
JDKConnection(String endpointIn,
JsonParser<T> parserIn,
ClientConfig configIn)
Init a connection to a given Salt API endpoint.
|
Modifier and Type | Method and Description |
---|---|
T |
getResult()
Send a GET request and parse the result into object of given
Type . |
T |
getResult(String data)
Send a POST request and parse the result into object of given
Type . |
public JDKConnection(String endpointIn, JsonParser<T> parserIn, ClientConfig configIn)
endpointIn
- the endpointparserIn
- the parser to be used for parsing the resultconfigIn
- the configpublic T getResult(String data) throws SaltException
Type
.getResult
in interface Connection<T>
data
- the data to send (in JSON format)SaltException
- if the request was not successfulpublic T getResult() throws SaltException
Type
.getResult
in interface Connection<T>
SaltException
- if the request was not successfulCopyright © 2016. All rights reserved.