Package com.adobe.testing.s3mock
Class S3MockApplication
-
- All Implemented Interfaces:
@SpringBootApplication()@ComponentScan(excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION, value = {Controller.class}), @ComponentScan.Filter(type = FilterType.ANNOTATION, value = {ControllerAdvice.class}), @ComponentScan.Filter(type = FilterType.ANNOTATION, value = {RestController.class}), @ComponentScan.Filter(type = FilterType.ANNOTATION, value = {RestControllerAdvice.class})}) public final class S3MockApplication
-
-
Field Summary
Fields Modifier and Type Field Description public final static IntegerDEFAULT_HTTPS_PORTpublic final static IntegerDEFAULT_HTTP_PORTpublic final static IntegerRANDOM_PORTpublic final static StringDEFAULT_SERVER_SSL_KEY_STOREpublic final static StringDEFAULT_SERVER_SSL_KEY_STORE_PASSWORDpublic final static StringDEFAULT_SERVER_SSL_KEY_ALIASpublic final static StringDEFAULT_SERVER_SSL_KEY_PASSWORDpublic final static StringPROP_HTTPS_PORTpublic final static StringPROP_HTTP_PORTpublic final static StringSERVER_SSL_KEY_STOREpublic final static StringSERVER_SSL_KEY_STORE_PASSWORDpublic final static StringSERVER_SSL_KEY_ALIASpublic final static StringSERVER_SSL_KEY_PASSWORDpublic final static StringPROP_SILENTprivate final Integerportprivate final IntegerhttpPort
-
Constructor Summary
Constructors Constructor Description S3MockApplication(ConfigurableApplicationContext context, KmsKeyStore kmsKeyStore, Environment environment, Connector httpConnector)
-
Method Summary
Modifier and Type Method Description final IntegergetPort()Gets the Https server port. final IntegergetHttpPort()Gets the Http server port. final Unitstop()Stops the server. final UnitregisterKMSKeyRef(String keyRef)Registers a valid KMS key reference on the mock server. final static Unitmain(Array<String> args)Main Class that starts the server using . final static S3MockApplicationstart(String args)Starts the server. final static S3MockApplicationstart(Map<String, Object> properties, String args)Starts the server. -
-
Constructor Detail
-
S3MockApplication
S3MockApplication(ConfigurableApplicationContext context, KmsKeyStore kmsKeyStore, Environment environment, Connector httpConnector)
-
-
Method Detail
-
getPort
@Deprecated(message = "Using the S3Mock directly through Java is discouraged. Either run the JAR and start a separate JVM, or run the Docker container.") final Integer getPort()
Gets the Https server port.
- Returns:
Https server port.
-
getHttpPort
@Deprecated(message = "Using the S3Mock directly through Java is discouraged. Either run the JAR and start a separate JVM, or run the Docker container.") final Integer getHttpPort()
Gets the Http server port.
- Returns:
Http server port.
-
registerKMSKeyRef
@Deprecated(message = "Using the S3Mock directly through Java is discouraged. Either run the JAR and start a separate JVM, or run the Docker container.") final Unit registerKMSKeyRef(String keyRef)
Registers a valid KMS key reference on the mock server.
- Parameters:
keyRef- A KMS Key Reference
-
main
final static Unit main(Array<String> args)
Main Class that starts the server using .start.
- Parameters:
args- Default command args.
-
start
final static S3MockApplication start(String args)
Starts the server.
- Parameters:
args- in program args format, e.g.- Returns:
-
-
-
-