Package com.thecoderscorner.menu.remote
Interface ConnectorFactory
- All Known Implementing Classes:
SocketControllerBuilder
public interface ConnectorFactory
A base connection factory for client side remote connectors that can build connections and try to pair with a device.
This is for client side connections such as embedCONTROL remote and RemoteConnectors.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanattemptPairing(Optional<Consumer<AuthStatus>> maybePairingListener) Attempt to pair with a remote optionally providing a listener that gets notified of status for updating a UI for example.build()Build a remote connection from the factory and return a controller that can be used to manage the menu on a remote device.
-
Method Details
-
build
Build a remote connection from the factory and return a controller that can be used to manage the menu on a remote device.- Returns:
- the controller object
- Throws:
IOException- if the controller cannot be created
-
attemptPairing
Attempt to pair with a remote optionally providing a listener that gets notified of status for updating a UI for example. It returns when pairing is complete.- Parameters:
maybePairingListener- an optional pairing listener to listen for status updates- Returns:
- true if successful, otherwise false.
- Throws:
IOException- if the pairing connection fails.
-