embedCONTROLCore
Public Member Functions | List of all members
com.thecoderscorner.embedcontrol.core.creators.ConnectionCreator Interface Reference
Inheritance diagram for com.thecoderscorner.embedcontrol.core.creators.ConnectionCreator:
com.thecoderscorner.embedcontrol.core.creators.ManualLanConnectionCreator com.thecoderscorner.embedcontrol.core.creators.Rs232ConnectionCreator com.thecoderscorner.embedcontrol.core.creators.SimulatorConnectionCreator

Public Member Functions

String getName ()
 
AuthStatus currentState ()
 
RemoteMenuController start () throws Exception
 
boolean attemptPairing (Consumer< AuthStatus > statusConsumer) throws Exception
 

Detailed Description

A connection creator is responsible for creating a remote connection. Once created the start method needs to be called in order to actually get hold of the remote controller object. It can also handle the pairing with a device. It is mainly used by embedCONTROL remote to both present and deal with new connections.

See also
RemoteMenuController

Member Function Documentation

◆ attemptPairing()

boolean com.thecoderscorner.embedcontrol.core.creators.ConnectionCreator.attemptPairing ( Consumer< AuthStatus >  statusConsumer) throws Exception

Attempt to pair with the remote, this method is synchronous and should never be called on the UI thread. Usually prefer to run through an executor. The provide consumer will be called back during the process with status updates suitable for presenting on the UI. This will not be called on the UI thread however.

Parameters
statusConsumerthe consumer of update events, not on UI thread.
Returns
true if successful, otherwise false.
Exceptions
Exceptionin the event pairing was not possible

Implemented in com.thecoderscorner.embedcontrol.core.creators.SimulatorConnectionCreator, com.thecoderscorner.embedcontrol.core.creators.Rs232ConnectionCreator, and com.thecoderscorner.embedcontrol.core.creators.ManualLanConnectionCreator.

◆ currentState()

AuthStatus com.thecoderscorner.embedcontrol.core.creators.ConnectionCreator.currentState ( )

◆ getName()

String com.thecoderscorner.embedcontrol.core.creators.ConnectionCreator.getName ( )

◆ start()

RemoteMenuController com.thecoderscorner.embedcontrol.core.creators.ConnectionCreator.start ( ) throws Exception

Use this method to start the underlying connection and get hold a controller object.

Returns
the controller object
Exceptions
Exceptionif unable to create the controller

Implemented in com.thecoderscorner.embedcontrol.core.creators.SimulatorConnectionCreator, com.thecoderscorner.embedcontrol.core.creators.Rs232ConnectionCreator, and com.thecoderscorner.embedcontrol.core.creators.ManualLanConnectionCreator.


The documentation for this interface was generated from the following file: