Interface MsgSender

  • All Known Implementing Classes:
    DefaultHTTPMsgSender

    public interface MsgSender
    Interface to send and receive request and response messages to an end point. Created by Philip Vendil on 16/06/16.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  MsgSender.MsgCallback
      Message callback interface for receiving response data or errors.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      byte[] sendMsg​(byte[] request)
      Method to syncronically send a request and wait for a response.
      void sendMsg​(byte[] request, MsgSender.MsgCallback callback)
      Method to asyncronically send a request and response (or error) is signaled through callback.
      boolean testConnection()
      Method to check the connection
    • Method Detail

      • sendMsg

        void sendMsg​(byte[] request,
                     MsgSender.MsgCallback callback)
        Method to asyncronically send a request and response (or error) is signaled through callback.
        Parameters:
        request - the request to send.
        callback - the callback to signal when the reply is recieved.
      • testConnection

        boolean testConnection()
        Method to check the connection
        Returns:
        true, if connection works.