Class ClientFactory


  • public abstract class ClientFactory
    extends java.lang.Object
    A factory class that is used to create GatewayClient 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 use
        bankMemberId - the bank member id
        bankId - the bank id
        crypto - crypto engine to use for signing requests, tokens, etc
        Returns:
        newly created client