Package com.exonum.binding.core.runtime
Class ServiceInstanceSpec
- java.lang.Object
-
- com.exonum.binding.core.runtime.ServiceInstanceSpec
-
public abstract class ServiceInstanceSpec extends Object
A specification of a service instance.
-
-
Constructor Summary
Constructors Constructor Description ServiceInstanceSpec()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.exonum.binding.common.runtime.ServiceArtifactIdgetArtifactId()Returns the service artifact id.abstract intgetId()Returns the numeric id of the service instance.abstract StringgetName()Returns the name of the service instance.static ServiceInstanceSpecnewInstance(String name, int id, com.exonum.binding.common.runtime.ServiceArtifactId artifactId)
-
-
-
Method Detail
-
getName
public abstract String getName()
Returns the name of the service instance. It serves as the primary identifier of this service in most operations. It is assigned by the network administrators.
-
getId
public abstract int getId()
Returns the numeric id of the service instance. Exonum assigns it to the service on instantiation. It is mainly used to route the transaction messages belonging to this instance.- See Also:
TransactionMessage.getServiceId()
-
getArtifactId
public abstract com.exonum.binding.common.runtime.ServiceArtifactId getArtifactId()
Returns the service artifact id.
-
newInstance
public static ServiceInstanceSpec newInstance(String name, int id, com.exonum.binding.common.runtime.ServiceArtifactId artifactId)
-
-