Interface ServiceCreationConfiguration<T extends Service,R>

Type Parameters:
T - the service type this configuration works with
R - the type of the detached representation

public interface ServiceCreationConfiguration<T extends Service,R>
A configuration type used when creating a Service.
  • Method Summary

    Modifier and Type
    Method
    Description
    build(R representation)
    Construct a new configuration from the given detached representation.
    default boolean
    Returns true if this configuration can co-exist with other in the same manager configuration.
    default R
    Derive a detached representation from this configuration
    Indicates which service consumes this configuration at creation.
  • Method Details

    • getServiceType

      Class<T> getServiceType()
      Indicates which service consumes this configuration at creation.
      Returns:
      the service type
    • derive

      default R derive() throws UnsupportedOperationException
      Derive a detached representation from this configuration
      Returns:
      a detached representation
      Throws:
      UnsupportedOperationException - if the configuration has no representation
    • build

      default ServiceCreationConfiguration<T,?> build(R representation) throws UnsupportedOperationException
      Construct a new configuration from the given detached representation.
      Parameters:
      representation - a detached representation
      Returns:
      a new configuration
      Throws:
      UnsupportedOperationException - if the configuration has no representation
    • compatibleWith

      default boolean compatibleWith(ServiceCreationConfiguration<?,?> other)
      Returns true if this configuration can co-exist with other in the same manager configuration.

      The default implementation of compatibleWith (as used by many of the implementations) considers any instance of the same type (or a sub-type) to be incompatible with this instance.

      Parameters:
      other - other service creation configuration
      Returns:
      true if the two configurations are compatible