Interface PeripheralCommAdapterFactory

All Superinterfaces:
Lifecycle

public interface PeripheralCommAdapterFactory
extends Lifecycle
Provides communication adapter instances for peripheral devices to be controlled.
  • Method Details

    • getDescription

      @Nonnull PeripheralCommAdapterDescription getDescription()
      Returns a PeripheralCommAdapterDescription for the factory/the adapters provided.
      Returns:
      A PeripheralCommAdapterDescription for the factory/the adapters provided.
    • providesAdapterFor

      boolean providesAdapterFor​(@Nonnull Location location)
      Checks whether this factory can provide a communication adapter for the given location/peripheral device.
      Parameters:
      location - The location to check for.
      Returns:
      true if, and only if, this factory can provide a communication adapter to control the given location/peripheral device.
    • getAdapterFor

      @Nullable PeripheralCommAdapter getAdapterFor​(@Nonnull Location location)
      Returns a communication adapter for controlling the given location/peripheral device.
      Parameters:
      location - The location/peripheral device to be controlled.
      Returns:
      A communication adapter for controlling the given location/peripheral device, or null, if this factory cannot provide an adapter for it.