com.sap.cloud.mt.subscription.ServiceSpecification Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of multi-tenant-subscription Show documentation
Show all versions of multi-tenant-subscription Show documentation
Spring Boot Enablement Parent
/*
* ----------------------------------------------------------------
* © 2022 SAP SE or an SAP affiliate company. All rights reserved.
* ----------------------------------------------------------------
*
*/
package com.sap.cloud.mt.subscription;
import com.sap.cloud.mt.tools.api.RequestEnhancer;
import com.sap.cloud.mt.tools.api.ResilienceConfig;
public class ServiceSpecification {
private final ResilienceConfig resilienceConfig;
private final PollingParameters polling;
private final RequestEnhancer requestEnhancer;
private ServiceSpecification(ResilienceConfig resilienceConfig,
PollingParameters polling, RequestEnhancer requestEnhancer) {
this.resilienceConfig = resilienceConfig;
this.polling = polling;
this.requestEnhancer = requestEnhancer;
}
public ResilienceConfig getResilienceConfig() {
return resilienceConfig;
}
public RequestEnhancer getRequestEnhancer() {
return requestEnhancer;
}
public PollingParameters getPolling() {
return polling;
}
public static final class Builder {
private ResilienceConfig resilienceConfig;
private PollingParameters polling;
private RequestEnhancer requestEnhancer;
private Builder() {
}
public static Builder create() {
return new Builder();
}
public Builder resilienceConfig(ResilienceConfig resilienceConfig) {
this.resilienceConfig = resilienceConfig;
return this;
}
public Builder polling(PollingParameters polling) {
this.polling = polling;
return this;
}
public Builder requestEnhancer(RequestEnhancer requestEnhancer) {
this.requestEnhancer = requestEnhancer;
return this;
}
public ServiceSpecification build() {
return new ServiceSpecification(resilienceConfig, polling, requestEnhancer);
}
}
}