Package com.exonum.binding.core.runtime
Class ServiceInstanceSpec
java.lang.Object
com.exonum.binding.core.runtime.ServiceInstanceSpec
public abstract class ServiceInstanceSpec
extends java.lang.Object
A specification of a service instance.
-
Constructor Summary
Constructors Constructor Description ServiceInstanceSpec()
-
Method Summary
Modifier and Type Method Description abstract ServiceArtifactId
getArtifactId()
Returns the service artifact id.abstract int
getId()
Returns the numeric id of the service instance.abstract java.lang.String
getName()
Returns the name of the service instance.static ServiceInstanceSpec
newInstance(java.lang.String name, int id, ServiceArtifactId artifactId)
-
Constructor Details
-
ServiceInstanceSpec
public ServiceInstanceSpec()
-
-
Method Details
-
getName
public abstract java.lang.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
Returns the service artifact id. -
newInstance
public static ServiceInstanceSpec newInstance(java.lang.String name, int id, ServiceArtifactId artifactId)
-