public abstract class ServiceId extends Object
The extensions of this class must be immutable and hence thread-safe.
| Constructor and Description |
|---|
ServiceId() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getArtifactId()
Returns the artifact id of this service (e.g., "land-registry"), aka service name.
|
abstract String |
getGroupId()
Returns the group id of this service (e.g., "com.acme").
|
abstract String |
getVersion()
Returns the version of this service (e.g., "1.2.0").
|
static ServiceId |
of(String groupId,
String artifactId,
String version)
Creates a new service id of the given coordinate.
|
static ServiceId |
parseFrom(String serviceId)
Parses a service id in format "groupId:artifactId:version" as
toString() produces. |
String |
toString()
Returns a service id in the following format: "groupId:artifactId:version".
|
public abstract String getGroupId()
public abstract String getArtifactId()
public abstract String getVersion()
public static ServiceId parseFrom(String serviceId)
toString() produces.serviceId - a string in format "groupId:artifactId:version". Whitespace characters,
including preceding and trailing, are not allowedIllegalArgumentException - if the format is not correctpublic static ServiceId of(String groupId, String artifactId, String version)
IllegalArgumentException - if any coordinate contains forbidden characters: whitespace,
colonCopyright © 2019 Exonum. All rights reserved.