Class LiveCommandFactory


  • @Immutable
    public final class LiveCommandFactory
    extends Object
    A factory for creating immutable instances of LiveCommand based on existing Twin Commands.
    • Method Detail

      • getInstance

        @Nonnull
        public static LiveCommandFactory getInstance()
        Returns an instance of LiveCommandFactory.
        Returns:
        the instance.
      • getLiveCommand

        @Nonnull
        public LiveCommand getLiveCommand​(@Nonnull
                                          org.eclipse.ditto.signals.commands.base.Command<?> command)
        Returns an immutable LiveCommand which is associated with the specified Command.
        Parameters:
        command - the command to get a LiveCommand for.
        Returns:
        the LiveCommand.
        Throws:
        NullPointerException - if command is null.
        IllegalArgumentException - if the given command cannot be mapped to a LiveCommand because there is no mapping strategy associated with the command's type.