-
public class ConnectionManager
-
-
Constructor Summary
Constructors Constructor Description ConnectionManager(UsbManager usbManager, UsbDevice usbDevice)
-
Method Summary
Modifier and Type Method Description static <T extends YubiKeyConnection> voidregisterConnectionHandler(Class<T> connectionClass, ConnectionHandler<out T> handler)Registers a new ConnectionHandler for creating YubiKeyConnections. booleansupportsConnection(Class<out YubiKeyConnection> connectionType)Checks to see if a given connection type is supported <T extends YubiKeyConnection> TopenConnection(Class<T> connectionType)TODO: fixmeChecks if a connection type is supported by the device, attempts to acquire the connectionlock, and returns a connection. -
-
Constructor Detail
-
ConnectionManager
ConnectionManager(UsbManager usbManager, UsbDevice usbDevice)
-
-
Method Detail
-
registerConnectionHandler
static <T extends YubiKeyConnection> void registerConnectionHandler(Class<T> connectionClass, ConnectionHandler<out T> handler)
Registers a new ConnectionHandler for creating YubiKeyConnections.
- Parameters:
connectionClass- the type of connection created by the handlerhandler- the handler responsible for creating connections
-
supportsConnection
boolean supportsConnection(Class<out YubiKeyConnection> connectionType)
Checks to see if a given connection type is supported
- Parameters:
connectionType- the type of connection to check support for
-
openConnection
@WorkerThread() <T extends YubiKeyConnection> T openConnection(Class<T> connectionType)
TODO: fixme
Checks if a connection type is supported by the device, attempts to acquire the connectionlock, and returns a connection.
- Parameters:
connectionType- the type of connection to open
-
-
-
-