Home / Type/ SslStoreBundle Type — spring-boot Architecture

SslStoreBundle Type — spring-boot Architecture

Architecture documentation for the SslStoreBundle type/interface in SslStoreBundle.java from the spring-boot codebase.

Entity Profile

Source Code

core/spring-boot/src/main/java/org/springframework/boot/ssl/SslStoreBundle.java lines 32–95

public interface SslStoreBundle {

	/**
	 * {@link SslStoreBundle} that returns {@code null} for each method.
	 */
	SslStoreBundle NONE = of(null, null, null);

	/**
	 * Return a key store generated from the trust material or {@code null}.
	 * @return the key store
	 */
	@Nullable KeyStore getKeyStore();

	/**
	 * Return the password for the key in the key store or {@code null}.
	 * @return the key password
	 */
	@Nullable String getKeyStorePassword();

	/**
	 * Return a trust store generated from the trust material or {@code null}.
	 * @return the trust store
	 */
	@Nullable KeyStore getTrustStore();

	/**
	 * Factory method to create a new {@link SslStoreBundle} instance.
	 * @param keyStore the key store or {@code null}
	 * @param keyStorePassword the key store password or {@code null}
	 * @param trustStore the trust store or {@code null}
	 * @return a new {@link SslStoreBundle} instance
	 */
	static SslStoreBundle of(@Nullable KeyStore keyStore, @Nullable String keyStorePassword,
			@Nullable KeyStore trustStore) {
		return new SslStoreBundle() {

			@Override
			public @Nullable KeyStore getKeyStore() {
				return keyStore;
			}

			@Override
			public @Nullable KeyStore getTrustStore() {
				return trustStore;
			}

			@Override
			public @Nullable String getKeyStorePassword() {
				return keyStorePassword;
			}

			@Override
			public String toString() {
				ToStringCreator creator = new ToStringCreator(this);
				creator.append("keyStore.type", (keyStore != null) ? keyStore.getType() : "none");
				creator.append("keyStorePassword", (keyStorePassword != null) ? "******" : null);
				creator.append("trustStore.type", (trustStore != null) ? trustStore.getType() : "none");
				return creator.toString();
			}

		};
	}

}

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free