Class ZookeeperDependency
java.lang.Object
org.springframework.cloud.zookeeper.discovery.dependency.ZookeeperDependency
Represents a particular dependency of Zookeeper instance.
- Since:
- 1.0.0
- Author:
- Marcin Grzejszczak, Spencer Gibb, Olga Maciaszek-Sharma
-
Constructor Summary
ConstructorsConstructorDescriptionZookeeperDependency(String path) ZookeeperDependency(String path, String contentTypeTemplate, String version, Map<String, Collection<String>> headers, boolean required, String stubs) -
Method Summary
Modifier and TypeMethodDescriptionFunction that will replace the placeholderVERSION_PLACEHOLDER_REGEXfrom thecontentTypeTemplatewith value fromversion.getPath()getStubs()getUpdatedHeaders(Map<String, Collection<String>> headers) booleanvoidsetContentTypeTemplate(String contentTypeTemplate) voidsetHeaders(Map<String, Collection<String>> headers) voidvoidsetRequired(boolean required) voidvoidsetStubsConfiguration(StubsConfiguration stubsConfiguration) voidsetVersion(String version) toString()
-
Constructor Details
-
ZookeeperDependency
public ZookeeperDependency() -
ZookeeperDependency
-
ZookeeperDependency
-
-
Method Details
-
getContentTypeWithVersion
Function that will replace the placeholderVERSION_PLACEHOLDER_REGEXfrom thecontentTypeTemplatewith value fromversion.e.g. having:
- contentTypeTemplate:
'application/vnd.some-service.$version+json'- version:
the result of the function will be'v1''application/vnd.some-service.v1+json'- Returns:
- content type template with version
- contentTypeTemplate:
-
getUpdatedHeaders
-
getPath
-
getContentTypeTemplate
-
getVersion
-
getHeaders
-
isRequired
public boolean isRequired() -
getStubs
-
getStubsConfiguration
-
setPath
-
setContentTypeTemplate
-
setVersion
-
setHeaders
-
setRequired
public void setRequired(boolean required) -
setStubs
-
setStubsConfiguration
-
toString
-