Class JsonMessageSender

    • Constructor Detail

      • JsonMessageSender

        public JsonMessageSender​(java.lang.String host,
                                 int port)
      • JsonMessageSender

        public JsonMessageSender​(java.lang.String host,
                                 int port,
                                 boolean ack)
    • Method Detail

      • sendMessage

        public void sendMessage​(IMessage message)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • writeMessage

        void writeMessage​(com.google.gson.stream.JsonWriter writer,
                          IMessage message)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • receiveMessage

        public IMessage receiveMessage()
                                throws java.lang.Exception
        Description copied from interface: IMessageSender
        Will return null or throw EOFException when the connection has been severed.
        Throws:
        java.lang.Exception
      • deserializeMessage

        IMessage deserializeMessage​(java.lang.String jsonMsg)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • p

        private static void p​(java.lang.String msg)