Class CommonGrpcClient


  • public final class CommonGrpcClient
    extends Object
    Class containing common methods for GRPC clients.
    • Field Detail

      • DEBUG_ENABLED

        protected static final boolean DEBUG_ENABLED
        Indicates if debug is enabled.
      • SERVICE_ALIAS_HEADER_KEY

        public static final io.grpc.Metadata.Key<String> SERVICE_ALIAS_HEADER_KEY
        Custom header key.
    • Method Detail

      • getLogicModuleAPI

        public LogicModuleAPI getLogicModuleAPI​(String targetIP,
                                                int targetPort)
                                         throws InterruptedException
        Get a Netty Logic Module API
        Parameters:
        targetIP - IP of the server
        targetPort - Port of the server
        Returns:
        A new TCPLogicModuleAPI
        Throws:
        InterruptedException - If connection was interrupted
      • getDataServiceAPI

        public DataServiceAPI getDataServiceAPI​(String targetIP,
                                                int targetPort)
                                         throws InterruptedException
        Get a Netty DataService API
        Parameters:
        targetIP - IP of the server
        targetPort - Port of the server
        Returns:
        A new DataServiceAPI
        Throws:
        InterruptedException - If connection was interrupted
      • finishClientConnections

        public void finishClientConnections()
        Finish client connections.
      • waitAndProcessAllAsyncRequests

        public void waitAndProcessAllAsyncRequests()
        Wait to process all async requests.
      • registerPendingObjects

        public void registerPendingObjects()
        Wait to process all pending objects.