Interface VehicleCommAdapterFactory

All Superinterfaces:
Lifecycle

public interface VehicleCommAdapterFactory
extends Lifecycle
Provides communication adapter instances for vehicles to be controlled.
  • Method Details

    • getDescription

      Returns a VehicleCommAdapterDescription for the factory/the adapters provided.
      Returns:
      A VehicleCommAdapterDescription for the factory/the adapters provided.
    • providesAdapterFor

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

      @Nullable VehicleCommAdapter getAdapterFor​(@Nonnull Vehicle vehicle)
      Returns a communication adapter for controlling the given vehicle.
      Parameters:
      vehicle - The vehicle to be controlled.
      Returns:
      A communication adapter for controlling the given vehicle, or null, if this factory cannot provide an adapter for it.