Package io.token.bank.rpc
Class ClientFactory
- java.lang.Object
-
- io.token.bank.rpc.ClientFactory
-
public abstract class ClientFactory extends java.lang.Object
A factory class that is used to createGatewayClient
instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GatewayClient
authenticatedBank(io.grpc.ManagedChannel channel, java.lang.String bankMemberId, java.util.Optional<java.lang.String> bankId, io.token.security.CryptoEngine crypto)
Creates authenticated bank client backed by the specified channel.static io.token.rpc.UnauthenticatedClient
unauthenticated(io.grpc.ManagedChannel channel)
Creates new unauthenticated client backed by the specified channel.
-
-
-
Method Detail
-
unauthenticated
public static io.token.rpc.UnauthenticatedClient unauthenticated(io.grpc.ManagedChannel channel)
Creates new unauthenticated client backed by the specified channel.- Parameters:
channel
- RPC channel to use- Returns:
- newly created client
-
authenticatedBank
public static GatewayClient authenticatedBank(io.grpc.ManagedChannel channel, java.lang.String bankMemberId, java.util.Optional<java.lang.String> bankId, io.token.security.CryptoEngine crypto)
Creates authenticated bank client backed by the specified channel. The supplied signer is used to authenticate the caller for every call.- Parameters:
channel
- RPC channel to usebankMemberId
- the bank member idbankId
- the bank idcrypto
- crypto engine to use for signing requests, tokens, etc- Returns:
- newly created client
-
-