Interface ICloverTransport

All Known Implementing Classes:
CloverTransport, DualDisplayCloverTransport, NativeCloverTransport, USBCloverTransport, WebSocketCloverTransport

public interface ICloverTransport
Interface to operate on an underlying transport
  • Method Details

    • initializeConnection

      void initializeConnection()
      Initializes the connection using the underlying transport
    • dispose

      void dispose()
      Closes the connection to the underlying transport
    • addObserver

      void addObserver(ICloverTransportObserver observer)
      Registers a listener to receive connect events and messages from the transport
      Parameters:
      observer - listener to add
    • removeObserver

      void removeObserver(ICloverTransportObserver observer)
      Remove a previously added listener. If the provided listener is not registered, this call has no effect.
      Parameters:
      observer - listener to remove
    • sendMessage

      int sendMessage(String message) throws NotYetConnectedException
      Sends the specified encoded message
      Parameters:
      message - encoded message to send
      Returns:
      0 if successful, -1 if failure
      Throws:
      NotYetConnectedException - if the message is sent when the underlying transport is not connected