Class USBCloverTransport
java.lang.Object
com.clover.remote.client.transport.CloverTransport
com.clover.remote.client.transport.usb.USBCloverTransport
- All Implemented Interfaces:
ICloverTransport
Implements the Clover Transport for USB
-
Field Summary
FieldsFields inherited from class com.clover.remote.client.transport.CloverTransport
DEVICE_CONNECTED, DEVICE_DISCONNECTED, DEVICE_READY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Closes the connection to the underlying transportprotected voidfinalize()voidInitializes the connection using the underlying transportintsendMessage(String message) Sends the specified encoded messageMethods inherited from class com.clover.remote.client.transport.CloverTransport
addObserver, getRemoteMessageVersion, notifyDeviceConnected, notifyDeviceDisconnected, notifyDeviceReady, onMessage, removeObserver
-
Field Details
-
ACTION_USB_PERMISSION
- See Also:
-
TAG
-
-
Constructor Details
-
USBCloverTransport
public USBCloverTransport(android.content.Context ctx)
-
-
Method Details
-
initializeConnection
public void initializeConnection()Description copied from interface:ICloverTransportInitializes the connection using the underlying transport -
finalize
-
dispose
public void dispose()Description copied from interface:ICloverTransportCloses the connection to the underlying transport- Specified by:
disposein interfaceICloverTransport- Overrides:
disposein classCloverTransport
-
sendMessage
Description copied from interface:ICloverTransportSends 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
-