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