Interface Configuration


public interface Configuration
Configuration parameters of Exonum service.

Network administrators agree on and pass the configuration parameters as a service-specific protobuf message when adding that service instance to the network. After Exonum starts the service, it passes the configuration parameters to the newly created service instance.

Reconfiguration of a started service may be implemented with a supervisor service and Configurable interface.

See Also:
Service.initialize(Fork, Configuration), Configurable
  • Method Summary

    Modifier and Type Method Description
    <MessageT extends com.google.protobuf.MessageLite>
    MessageT
    getAsMessage​(Class<MessageT> parametersType)
    Returns the configuration parameters as a Protocol Buffers message.
  • Method Details

    • getAsMessage

      <MessageT extends com.google.protobuf.MessageLite> MessageT getAsMessage​(Class<MessageT> parametersType)
      Returns the configuration parameters as a Protocol Buffers message.
      Parameters:
      parametersType - the type of a Protocol Buffers message in which the service configuration parameters are recorded in transactions starting the service instance
      Throws:
      IllegalArgumentException - if the actual type of the configuration parameters does not match the given type. Such mismatch might mean either a configuration error, when administrators pass the wrong parameters; or an error in the service itself
      See Also:
      StandardSerializers.protobuf(Class)