Class S3MockApplication


  • @Configuration
    @EnableAutoConfiguration(exclude=org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
                             excludeName="org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration")
    @ComponentScan
    public class S3MockApplication
    extends java.lang.Object
    File Store Application that mocks Amazon S3.
    • Field Detail

      • DEFAULT_SERVER_SSL_KEY_STORE

        public static final java.lang.String DEFAULT_SERVER_SSL_KEY_STORE
        See Also:
        Constant Field Values
      • DEFAULT_SERVER_SSL_KEY_STORE_PASSWORD

        public static final java.lang.String DEFAULT_SERVER_SSL_KEY_STORE_PASSWORD
        See Also:
        Constant Field Values
      • DEFAULT_SERVER_SSL_KEY_ALIAS

        public static final java.lang.String DEFAULT_SERVER_SSL_KEY_ALIAS
        See Also:
        Constant Field Values
      • DEFAULT_SERVER_SSL_KEY_PASSWORD

        public static final java.lang.String DEFAULT_SERVER_SSL_KEY_PASSWORD
        See Also:
        Constant Field Values
      • PROP_INITIAL_BUCKETS

        public static final java.lang.String PROP_INITIAL_BUCKETS
        Property name for passing a comma separated list of buckets that are to be created at startup.
        See Also:
        Constant Field Values
      • PROP_ROOT_DIRECTORY

        public static final java.lang.String PROP_ROOT_DIRECTORY
        Property name for passing a root directory to use. If omitted a default temp-dir will be used.
        See Also:
        Constant Field Values
      • PROP_HTTPS_PORT

        public static final java.lang.String PROP_HTTPS_PORT
        Property name for passing the HTTPS port to use. Defaults to 9191. If set to 0, a random port will be chosen.
        See Also:
        Constant Field Values
      • PROP_HTTP_PORT

        public static final java.lang.String PROP_HTTP_PORT
        Property name for passing the HTTP port to use. Defaults to 9090. If set to 0, a random port will be chosen.
        See Also:
        Constant Field Values
      • SERVER_SSL_KEY_STORE_PASSWORD

        public static final java.lang.String SERVER_SSL_KEY_STORE_PASSWORD
        Property name for passing the password for the keystore. Defaults to "password".
        See Also:
        Constant Field Values
      • SERVER_SSL_KEY_ALIAS

        public static final java.lang.String SERVER_SSL_KEY_ALIAS
        Property name for specifying the key to use. Defaults to "selfsigned".
        See Also:
        Constant Field Values
      • SERVER_SSL_KEY_PASSWORD

        public static final java.lang.String SERVER_SSL_KEY_PASSWORD
        Property name for passing the password for the key. Defaults to "password".
        See Also:
        Constant Field Values
      • PROP_SECURE_CONNECTION

        public static final java.lang.String PROP_SECURE_CONNECTION
        Property name for using either HTTPS or HTTP connections.
        See Also:
        Constant Field Values
      • PROP_SILENT

        public static final java.lang.String PROP_SILENT
        Property name for enabling the silent mode with logging set at WARN and without banner.
        See Also:
        Constant Field Values
    • Constructor Detail

      • S3MockApplication

        public S3MockApplication()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
        Main Class that starts the server using start(String...).
        Parameters:
        args - Default command args.
      • start

        public static S3MockApplication start​(java.lang.String... args)
        Starts the server.
        Parameters:
        args - in program args format, e.g. "--server.port=0".
        Returns:
        the S3MockApplication
      • start

        public static S3MockApplication start​(java.util.Map<java.lang.String,​java.lang.Object> properties,
                                              java.lang.String... args)
        Starts the server.
        Parameters:
        properties - properties to pass to the application in key-value format.
        args - in program args format, e.g. "--server.port=0".
        Returns:
        the S3MockApplication
      • stop

        public void stop()
        Stops the server.
      • getPort

        public int getPort()
        Gets the Https server port.
        Returns:
        Https server port.
      • getHttpPort

        public int getHttpPort()
        Gets the Http server port.
        Returns:
        Http server port.
      • registerKMSKeyRef

        public void registerKMSKeyRef​(java.lang.String keyRef)
        Registers a valid KMS key reference on the mock server.
        Parameters:
        keyRef - A KMS Key Reference