Class LiveCommandFactory
- java.lang.Object
-
- org.eclipse.ditto.signals.commands.live.LiveCommandFactory
-
@Immutable public final class LiveCommandFactory extends Object
A factory for creating immutable instances ofLiveCommandbased on existing Twin Commands.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LiveCommandFactorygetInstance()Returns an instance ofLiveCommandFactory.LiveCommandgetLiveCommand(org.eclipse.ditto.signals.commands.base.Command<?> command)Returns an immutableLiveCommandwhich is associated with the specified Command.
-
-
-
Method Detail
-
getInstance
@Nonnull public static LiveCommandFactory getInstance()
Returns an instance ofLiveCommandFactory.- Returns:
- the instance.
-
getLiveCommand
@Nonnull public LiveCommand getLiveCommand(@Nonnull org.eclipse.ditto.signals.commands.base.Command<?> command)
Returns an immutableLiveCommandwhich is associated with the specified Command.- Parameters:
command- the command to get a LiveCommand for.- Returns:
- the LiveCommand.
- Throws:
NullPointerException- ifcommandisnull.IllegalArgumentException- if the given command cannot be mapped to a LiveCommand because there is no mapping strategy associated with the command's type.
-
-