Class ServiceConfigBase<T>

All Implemented Interfaces:
Serializable

public abstract class ServiceConfigBase<T> extends AbstractServiceConfig
Base configuration for service.
See Also:
  • Constructor Details

    • ServiceConfigBase

      public ServiceConfigBase()
    • ServiceConfigBase

      public ServiceConfigBase(ModuleModel moduleModel)
    • ServiceConfigBase

      public ServiceConfigBase(Service service)
    • ServiceConfigBase

      public ServiceConfigBase(ModuleModel moduleModel, Service service)
  • Method Details

    • setProtocols

      public void setProtocols(List<? extends ProtocolConfig> protocols)
      Overrides:
      setProtocols in class AbstractServiceConfig
    • shouldExport

      public boolean shouldExport()
    • getExport

      public Boolean getExport()
      Overrides:
      getExport in class AbstractServiceConfig
    • shouldDelay

      public boolean shouldDelay()
    • getDelay

      public Integer getDelay()
      Overrides:
      getDelay in class AbstractServiceConfig
    • getContextPath

      public Optional<String> getContextPath(ProtocolConfig protocolConfig)
    • getMetaData

      public Map<String,String> getMetaData()
      Description copied from class: AbstractConfig

      The new instance of the AbstractConfig subclass should return empty metadata. The purpose is to get the attributes set by the user instead of the default value when the AbstractConfig.refresh() method handles attribute overrides.

      The default value of the field should be set in the AbstractConfig.checkDefault() method, which will be called at the end of AbstractConfig.refresh(), so that it will not affect the behavior of attribute overrides.

      Should be called after Config was fully initialized.

      Notice! This method should include all properties in the returning map, treat @Parameter differently compared to appendParameters?

      // FIXME: this method should be completely replaced by appendParameters? // -- Url parameter may use key, but props override only use property name. So replace it with appendAttributes().
      Overrides:
      getMetaData in class AbstractConfig
      See Also:
    • getMetaData

      public Map<String,String> getMetaData(String prefix)
      Overrides:
      getMetaData in class AbstractConfig
    • getInterfaceClass

      public Class<?> getInterfaceClass()
    • setInterfaceClass

      public void setInterfaceClass(Class<?> interfaceClass)
      Deprecated.
      See Also:
    • setInterface

      public void setInterface(Class<?> interfaceClass)
    • checkInterface

      public void checkInterface()
    • getRef

      public T getRef()
    • setRef

      public void setRef(T ref)
    • getPath

      @Parameter(excluded=true) public String getPath()
    • setPath

      public void setPath(String path)
    • getProvider

      public ProviderConfig getProvider()
    • setProvider

      public void setProvider(ProviderConfig provider)
    • getProviderIds

      @Parameter(excluded=true) public String getProviderIds()
    • setProviderIds

      public void setProviderIds(String providerIds)
    • getGeneric

      public String getGeneric()
    • setGeneric

      public void setGeneric(String generic)
    • getServiceMetadata

      public ServiceMetadata getServiceMetadata()
    • getPrefixes

      @Parameter(excluded=true, attribute=false) public List<String> getPrefixes()
      Overrides:
      getPrefixes in class AbstractConfig
    • getUniqueServiceName

      @Parameter(excluded=true, attribute=false) public String getUniqueServiceName()
    • getGroup

      public String getGroup()
      Overrides:
      getGroup in class AbstractServiceConfig
    • getVersion

      public String getVersion()
      Overrides:
      getVersion in class AbstractServiceConfig
    • shouldExportAsync

      public Boolean shouldExportAsync()
    • export

      public final void export()
      export service and auto start application instance
    • unexport

      public abstract void unexport()
    • isExported

      public abstract boolean isExported()
    • isUnexported

      public abstract boolean isUnexported()
    • export

      public abstract void export(RegisterTypeEnum registerType)
      Export service to network
      Parameters:
      registerType - register type of current export action.
    • register

      public final void register()
      Register delay published service to registry.
    • register

      public abstract void register(boolean byDeployer)
      Register delay published service to registry.
      Parameters:
      byDeployer - register by deployer or not.