public class SynchronousWatchtowerClientAPI extends SynchronousAPI
channel, DEFAULT_MAX_INBOUND_MESSAGE_SIZE, log, performValidation, statusExceptionWrapper, wrapperFactory| Constructor and Description |
|---|
SynchronousWatchtowerClientAPI(io.grpc.ManagedChannel channel)
Constructor used for setting up a connection using a GRPC managed channel that
can be customized.
|
SynchronousWatchtowerClientAPI(java.lang.String host,
int port,
java.io.File trustedServerCertificate,
java.io.File macaroonFile)
Minimal constructor for setting up a connection with LND Application.
|
SynchronousWatchtowerClientAPI(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 |
|---|---|
AddTowerResponse |
addTower(AddTowerRequest request)
Method to send a addTower request.
|
AddTowerResponse |
addTower(byte[] pubkey,
java.lang.String address)
Method to generate a addTower request.
|
protected WatchtowerClientGrpc.WatchtowerClientBlockingStub |
getStub() |
Tower |
getTowerInfo(byte[] pubkey,
java.lang.Boolean includeSessions,
java.lang.Boolean excludeExhaustedSessions)
Method to generate a getTowerInfo request.
|
Tower |
getTowerInfo(GetTowerInfoRequest request)
Method to send a getTowerInfo request.
|
ListTowersResponse |
listTowers(java.lang.Boolean includeSessions,
java.lang.Boolean excludeExhaustedSessions)
Method to generate a listTowers request.
|
ListTowersResponse |
listTowers(ListTowersRequest request)
Method to send a listTowers request.
|
PolicyResponse |
policy(PolicyRequest request)
Method to send a policy request.
|
PolicyResponse |
policy(PolicyType policyType)
Method to generate a policy request.
|
RemoveTowerResponse |
removeTower(byte[] pubkey,
java.lang.String address)
Method to generate a removeTower request.
|
RemoveTowerResponse |
removeTower(RemoveTowerRequest request)
Method to send a removeTower request.
|
StatsResponse |
stats()
Method to generate a stats request.
|
StatsResponse |
stats(StatsRequest request)
Method to send a stats request.
|
processRepeatableResponse, processResponseclose, isPerformValidation, processRequest, setPerformValidation, validatepublic SynchronousWatchtowerClientAPI(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 SynchronousWatchtowerClientAPI(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 SynchronousWatchtowerClientAPI(io.grpc.ManagedChannel channel)
channel - the managed channel to use.public RemoveTowerResponse removeTower(byte[] pubkey, java.lang.String address) 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.removeTower(Wtclient.RemoveTowerRequest)public RemoveTowerResponse removeTower(RemoveTowerRequest 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.removeTower(Wtclient.RemoveTowerRequest)public ListTowersResponse listTowers(java.lang.Boolean includeSessions, java.lang.Boolean excludeExhaustedSessions) 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.listTowers(Wtclient.ListTowersRequest)public ListTowersResponse listTowers(ListTowersRequest 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.listTowers(Wtclient.ListTowersRequest)public Tower getTowerInfo(byte[] pubkey, java.lang.Boolean includeSessions, java.lang.Boolean excludeExhaustedSessions) 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.getTowerInfo(Wtclient.GetTowerInfoRequest)public Tower getTowerInfo(GetTowerInfoRequest 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.getTowerInfo(Wtclient.GetTowerInfoRequest)public AddTowerResponse addTower(byte[] pubkey, java.lang.String address) 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.addTower(Wtclient.AddTowerRequest)public AddTowerResponse addTower(AddTowerRequest 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.addTower(Wtclient.AddTowerRequest)public PolicyResponse policy(PolicyType policyType) 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.policy(Wtclient.PolicyRequest)public PolicyResponse policy(PolicyRequest 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.policy(Wtclient.PolicyRequest)public StatsResponse stats() 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.stats(Wtclient.StatsRequest)public StatsResponse stats(StatsRequest 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.WatchtowerClientGrpc.WatchtowerClientBlockingStub.stats(Wtclient.StatsRequest)protected WatchtowerClientGrpc.WatchtowerClientBlockingStub getStub()