Class SourceTransformerTestKit.Client

  • Enclosing class:
    SourceTransformerTestKit

    public static class SourceTransformerTestKit.Client
    extends java.lang.Object
    Client is a client for sending requests to the sourceTransform server.
    • Constructor Summary

      Constructors 
      Constructor Description
      Client()
      empty constructor for Client.
      Client​(java.lang.String host, int port)
      constructor for Client with host and port.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the client.
      MessageList sendRequest​(java.lang.String[] keys, Datum data)
      Send a request to the server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Client

        public Client()
        empty constructor for Client. default host is localhost and port is 50051.
      • Client

        public Client​(java.lang.String host,
                      int port)
        constructor for Client with host and port.
        Parameters:
        host - the host to connect to
        port - the port to connect to
    • Method Detail

      • sendRequest

        public MessageList sendRequest​(java.lang.String[] keys,
                                       Datum data)
        Send a request to the server.
        Parameters:
        keys - keys to send in the request
        data - data to send in the request
        Returns:
        response from the server as a MessageList
      • close

        public void close()
                   throws java.lang.InterruptedException
        Close the client.
        Throws:
        java.lang.InterruptedException - if the client fails to close