public abstract class ServiceArtifactId extends Object
The extensions of this class must be immutable and hence thread-safe.
| Constructor and Description |
|---|
ServiceArtifactId() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getName()
Returns the full artifact name of this service (e.g., "com.acme:land-registry:1.2.0").
|
abstract int |
getRuntimeId()
Returns the runtime id in which the service shall be deployed.
|
static ServiceArtifactId |
newJavaId(String name)
Creates a new service artifact id of a Java artifact.
|
static ServiceArtifactId |
parseFrom(String serviceArtifactId)
Parses a service id in format "runtimeId:serviceName" as
toString() produces. |
String |
toString()
Returns an artifact id in the following format: "runtimeId:serviceName".
|
static ServiceArtifactId |
valueOf(int runtimeId,
String name)
Creates a new service artifact id.
|
public abstract int getRuntimeId()
public abstract String getName()
public static ServiceArtifactId parseFrom(String serviceArtifactId)
toString() produces.serviceArtifactId - a string in format "runtimeId:serviceName". Whitespace
characters, including preceding and trailing, are not allowedIllegalArgumentException - if the format is not correctpublic static ServiceArtifactId newJavaId(String name)
name - the name of the service; must not be blankpublic static ServiceArtifactId valueOf(int runtimeId, String name)
runtimeId - the runtime id in which the service shall be deployedname - the name of the service; must not be blankCopyright © 2019 Exonum. All rights reserved.