Class AbstractLocalEmulatorRuntime
java.lang.Object
com.cloudforge.core.local.AbstractLocalEmulatorRuntime
- All Implemented Interfaces:
LocalEmulatorRuntime
- Direct Known Subclasses:
LocalStackEmulatorRuntime, MiniStackEmulatorRuntime
Shared Docker lifecycle for CloudForge local emulators.
Target modules supply dockerCreateArgs() only; container names, health URLs,
and conflict handling come from LocalEmulatorSpec in core.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional container that must be stopped first because it binds the same gateway port.Stable Docker container name (for examplecfc-ministack).Arguments afterdocker run -dwhen the container does not yet exist.Gateway health URL on the host (for examplehttp://localhost:4566/_ministack/health).booleanWhether the gateway health endpoint returns HTTP 2xx.booleanWhether the named container is in the running state.protected voidprotected LocalEmulatorSpecspec()voidstart()Start the emulator container and wait untilLocalEmulatorRuntime.isHealthy().voidstop()Stop the emulator container if it is running.target()Deployment target this runtime serves.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LocalEmulatorRuntime
restart
-
Constructor Details
-
AbstractLocalEmulatorRuntime
-
-
Method Details
-
spec
-
dockerCreateArgs
Arguments afterdocker run -dwhen the container does not yet exist.- Throws:
IOException
-
target
Description copied from interface:LocalEmulatorRuntimeDeployment target this runtime serves.- Specified by:
targetin interfaceLocalEmulatorRuntime
-
containerName
Description copied from interface:LocalEmulatorRuntimeStable Docker container name (for examplecfc-ministack).- Specified by:
containerNamein interfaceLocalEmulatorRuntime
-
conflictingContainerName
Description copied from interface:LocalEmulatorRuntimeOptional container that must be stopped first because it binds the same gateway port.- Specified by:
conflictingContainerNamein interfaceLocalEmulatorRuntime
-
healthEndpoint
Description copied from interface:LocalEmulatorRuntimeGateway health URL on the host (for examplehttp://localhost:4566/_ministack/health).- Specified by:
healthEndpointin interfaceLocalEmulatorRuntime
-
start
Description copied from interface:LocalEmulatorRuntimeStart the emulator container and wait untilLocalEmulatorRuntime.isHealthy().- Specified by:
startin interfaceLocalEmulatorRuntime- Throws:
IOException
-
stop
Description copied from interface:LocalEmulatorRuntimeStop the emulator container if it is running.- Specified by:
stopin interfaceLocalEmulatorRuntime- Throws:
IOException
-
isRunning
Description copied from interface:LocalEmulatorRuntimeWhether the named container is in the running state.- Specified by:
isRunningin interfaceLocalEmulatorRuntime- Throws:
IOException
-
isHealthy
public boolean isHealthy()Description copied from interface:LocalEmulatorRuntimeWhether the gateway health endpoint returns HTTP 2xx.- Specified by:
isHealthyin interfaceLocalEmulatorRuntime
-
onStarted
- Throws:
IOException
-
baseDockerCreateArgs
-