public class SynchronousAutopilotAPI extends SynchronousAPI
channel, DEFAULT_MAX_INBOUND_MESSAGE_SIZE, log, performValidation, statusExceptionWrapper, wrapperFactory
Constructor and Description |
---|
SynchronousAutopilotAPI(io.grpc.ManagedChannel channel)
Constructor used for setting up a connection using a GRPC managed channel that
can be customized.
|
SynchronousAutopilotAPI(java.lang.String host,
int port,
java.io.File trustedServerCertificate,
java.io.File macaroonFile)
Minimal constructor for setting up a connection with LND Application.
|
SynchronousAutopilotAPI(java.lang.String host,
int port,
io.grpc.netty.shaded.io.netty.handler.ssl.SslContext sslContext,
MacaroonContext macaroonContext)
Constructor for setting up a connection with LND Application with more flexible
SSL context parameters.
|
Modifier and Type | Method and Description |
---|---|
protected AutopilotGrpc.AutopilotBlockingStub |
getStub() |
ModifyStatusResponse |
modifyStatus(java.lang.Boolean enable)
Method to generate a modifyStatus request.
|
ModifyStatusResponse |
modifyStatus(ModifyStatusRequest request)
Method to send a modifyStatus request.
|
QueryScoresResponse |
queryScores(java.util.List<java.lang.String> pubkeys,
java.lang.Boolean ignoreLocalState)
Method to generate a queryScores request.
|
QueryScoresResponse |
queryScores(QueryScoresRequest request)
Method to send a queryScores request.
|
SetScoresResponse |
setScores(SetScoresRequest request)
Method to send a setScores request.
|
SetScoresResponse |
setScores(java.lang.String heuristic,
java.util.Map<java.lang.String,java.lang.Double> scoress)
Method to generate a setScores request.
|
StatusResponse |
status()
Method to generate a status request.
|
StatusResponse |
status(StatusRequest request)
Method to send a status request.
|
processRepeatableResponse, processResponse
close, isPerformValidation, processRequest, setPerformValidation, validate
public SynchronousAutopilotAPI(java.lang.String host, int port, java.io.File trustedServerCertificate, java.io.File macaroonFile) throws javax.net.ssl.SSLException, ClientSideException
host
- the hostname of ldn applicationport
- the port of the application.trustedServerCertificate
- a link of the SSL certificate used by the LND Application.macaroonFile
- the file pointing to the macaroon to use, or null if no macaroons are used.javax.net.ssl.SSLException
- if problems occurred setting up the SSL Connection.ClientSideException
- if problems occurred reading the macaroon file.public SynchronousAutopilotAPI(java.lang.String host, int port, io.grpc.netty.shaded.io.netty.handler.ssl.SslContext sslContext, MacaroonContext macaroonContext)
host
- the hostname of ldn applicationport
- the port of the application.sslContext
- the SSL Context used when connecting the LND Application.macaroonContext
- the macaroon context to use.public SynchronousAutopilotAPI(io.grpc.ManagedChannel channel)
channel
- the managed channel to use.public ModifyStatusResponse modifyStatus(java.lang.Boolean enable) throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.modifyStatus(AutopilotOuterClass.ModifyStatusRequest)
public ModifyStatusResponse modifyStatus(ModifyStatusRequest request) throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.modifyStatus(AutopilotOuterClass.ModifyStatusRequest)
public QueryScoresResponse queryScores(java.util.List<java.lang.String> pubkeys, java.lang.Boolean ignoreLocalState) throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.queryScores(AutopilotOuterClass.QueryScoresRequest)
public QueryScoresResponse queryScores(QueryScoresRequest request) throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.queryScores(AutopilotOuterClass.QueryScoresRequest)
public SetScoresResponse setScores(java.lang.String heuristic, java.util.Map<java.lang.String,java.lang.Double> scoress) throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.setScores(AutopilotOuterClass.SetScoresRequest)
public SetScoresResponse setScores(SetScoresRequest request) throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.setScores(AutopilotOuterClass.SetScoresRequest)
public StatusResponse status() throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.status(AutopilotOuterClass.StatusRequest)
public StatusResponse status(StatusRequest request) throws StatusException, ValidationException
StatusException
- if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException
- if validation problems found in request or response data.AutopilotGrpc.AutopilotBlockingStub.status(AutopilotOuterClass.StatusRequest)
protected AutopilotGrpc.AutopilotBlockingStub getStub()