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)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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

      public abstract ServiceArtifactId getArtifactId()
      Returns the service artifact id.
    • newInstance

      public static ServiceInstanceSpec newInstance​(java.lang.String name, int id, ServiceArtifactId artifactId)