Class ClientFactory


  • public abstract class ClientFactory
    extends java.lang.Object
    A factory class that is used to create Client and UnauthenticatedClient instances.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Client authenticated​(io.grpc.ManagedChannel channel, java.lang.String memberId, io.token.security.CryptoEngine crypto)
      Creates authenticated client backed by the specified channel.
      static 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 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
      • authenticated

        public static Client authenticated​(io.grpc.ManagedChannel channel,
                                           java.lang.String memberId,
                                           io.token.security.CryptoEngine crypto)
        Creates authenticated client backed by the specified channel. The supplied signer is used to authenticate the caller for every call.
        Parameters:
        channel - RPC channel to use
        memberId - member id
        crypto - crypto engine to use for signing requests, tokens, etc
        Returns:
        newly created client