@NotThreadSafe
public class TargetSystemManager
extends java.lang.Object
implements io.flamingock.internal.common.core.context.ContextInitializable
TargetSystem instances.
It supports registering multiple target systems by ID, including a default one, and retrieving them with fallback logic.
Used internally by Flamingock to manage runtime access to registered targets.
| Constructor and Description |
|---|
TargetSystemManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(io.flamingock.api.external.TargetSystem targetSystem)
Registers a new
TargetSystem. |
TargetSystemOps |
getTargetSystem(java.lang.String id)
Returns the
TargetSystem associated with the given ID. |
TargetSystemOps |
getTargetSystem(io.flamingock.internal.common.core.task.TargetSystemDescriptor tsd)
Returns the
TargetSystem associated with the given descriptor. |
void |
initialize(io.flamingock.internal.common.core.context.ContextResolver contextResolver) |
public void initialize(io.flamingock.internal.common.core.context.ContextResolver contextResolver)
initialize in interface io.flamingock.internal.common.core.context.ContextInitializablepublic void add(io.flamingock.api.external.TargetSystem targetSystem)
TargetSystem.targetSystem - the target system to register (must be non-null and have a non-empty ID)java.lang.IllegalArgumentException - if the target system or its ID is null/blankpublic TargetSystemOps getTargetSystem(io.flamingock.internal.common.core.task.TargetSystemDescriptor tsd)
TargetSystem associated with the given descriptor.tsd - the target system descriptorio.flamingock.internal.common.core.error.FlamingockException - if relaxed is false and target system is not foundpublic TargetSystemOps getTargetSystem(java.lang.String id)
TargetSystem associated with the given ID.id - the target system IDio.flamingock.internal.common.core.error.FlamingockException - if relaxed is false and target system is not found