*/
public interface DmaapCustomConfig extends Serializable {
+ @Deprecated
@Value.Parameter
String dmaapHostName();
+ @Deprecated
@Value.Parameter
Integer dmaapPortNumber();
+ @Deprecated
@Value.Parameter
String dmaapTopicName();
+ @Deprecated
@Value.Parameter
String dmaapProtocol();
@Value.Parameter
Boolean enableDmaapCertAuth();
+ @Value.Parameter
+ String endpointUrl();
+
interface Builder<T extends DmaapCustomConfig, B extends Builder<T, B>> {
B dmaapHostName(String dmaapHostName);
B enableDmaapCertAuth(Boolean enableDmaapCertAuth);
+ B endpointUrl(String endpointUrl);
+
T build();
}
}
String keyStorePath = "keyStorePath";
String keyStorePasswordPath = "keyStorePasswordPath";
Boolean enableDmaapCertAuth = true;
+ String endpointUrl = "http://dmaap-mr:8080/events/topic";
+
// When
configuration = new ImmutableDmaapConsumerConfiguration.Builder()
.keyStorePath(keyStorePath)
.keyStorePasswordPath(keyStorePasswordPath)
.enableDmaapCertAuth(enableDmaapCertAuth)
+ .endpointUrl(endpointUrl)
.build();
// Then
+ "dmaapPortNumber=2222, dmaapTopicName=temp, dmaapProtocol=http, dmaapUserName=admin, "
+ "dmaapUserPassword=admin, dmaapContentType=application/json, "
+ "trustStorePath=trustStorePath, trustStorePasswordPath=trustStorePasswordPath, "
- + "keyStorePath=keyStorePath, keyStorePasswordPath=keyStorePasswordPath, enableDmaapCertAuth=true}",
+ + "keyStorePath=keyStorePath, keyStorePasswordPath=keyStorePasswordPath, enableDmaapCertAuth=true, "
+ + "endpointUrl=http://dmaap-mr:8080/events/topic}",
configuration.toString());
}
String keyStorePath = "keyStorePath";
String keyStorePasswordPath = "keyStorePasswordPath";
Boolean enableDmaapCertAuth = true;
+ String endpointUrl = "http://dmaap-mr:8080/events/topic";
// When
configuration = new ImmutableDmaapPublisherConfiguration.Builder()
.keyStorePath(keyStorePath)
.keyStorePasswordPath(keyStorePasswordPath)
.enableDmaapCertAuth(enableDmaapCertAuth)
+ .endpointUrl(endpointUrl)
.build();
// Then
+ "dmaapTopicName=temp, dmaapProtocol=http, dmaapUserName=admin, dmaapUserPassword=admin, "
+ "dmaapContentType=application/json, trustStorePath=trustStorePath, "
+ "trustStorePasswordPath=trustStorePasswordPath, keyStorePath=keyStorePath, "
- + "keyStorePasswordPath=keyStorePasswordPath, enableDmaapCertAuth=true}", configuration.toString());
+ + "keyStorePasswordPath=keyStorePasswordPath, enableDmaapCertAuth=true, "
+ + "endpointUrl=http://dmaap-mr:8080/events/topic}", configuration.toString());
}
}