Class AbstractConfigurableRemote<M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message>

Type Parameters:
M -
CONFIG -
All Implemented Interfaces:
RPCRemote<M>, org.openbase.jul.extension.type.iface.TransactionIdProvider, org.openbase.jul.iface.Activatable, org.openbase.jul.iface.Configurable<String,CONFIG>, org.openbase.jul.iface.Identifiable<String>, org.openbase.jul.iface.Initializable<CONFIG>, org.openbase.jul.iface.Lockable, org.openbase.jul.iface.Manageable<CONFIG>, org.openbase.jul.iface.provider.ConfigProvider<CONFIG>, org.openbase.jul.iface.provider.PingProvider, org.openbase.jul.iface.Shutdownable, org.openbase.jul.pattern.controller.ConfigurableRemote<String,M,CONFIG>, org.openbase.jul.pattern.controller.IdentifiableRemote<String,M>, org.openbase.jul.pattern.controller.Remote<M>, org.openbase.jul.pattern.provider.DataProvider<M>

public abstract class AbstractConfigurableRemote<M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message> extends AbstractIdentifiableRemote<M> implements org.openbase.jul.pattern.controller.ConfigurableRemote<String,M,CONFIG>, org.openbase.jul.iface.Configurable<String,CONFIG>
  • Constructor Details

    • AbstractConfigurableRemote

      public AbstractConfigurableRemote(Class<M> dataClass, Class<CONFIG> configClass)
  • Method Details

    • init

      public void init(CONFIG config) throws org.openbase.jul.exception.InitializationException, InterruptedException
      Specified by:
      init in interface org.openbase.jul.iface.Initializable<M extends com.google.protobuf.Message>
      Parameters:
      config -
    • applyConfigUpdate

      public CONFIG applyConfigUpdate(CONFIG config) throws org.openbase.jul.exception.CouldNotPerformException, InterruptedException
      Specified by:
      applyConfigUpdate in interface org.openbase.jul.iface.Configurable<M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message>
      Parameters:
      config -
      Returns:
    • notifyConfigUpdate

      protected void notifyConfigUpdate(CONFIG config) throws org.openbase.jul.exception.CouldNotPerformException
      Method can be overwritten to get internally informed about config updates.
      Parameters:
      config - new arrived config messages.
      Throws:
      org.openbase.jul.exception.CouldNotPerformException
    • getConfigField

      protected final Object getConfigField(String name) throws org.openbase.jul.exception.CouldNotPerformException
      Throws:
      org.openbase.jul.exception.CouldNotPerformException
    • getConfigField

      protected final Object getConfigField(String name, CONFIG config) throws org.openbase.jul.exception.CouldNotPerformException
      Throws:
      org.openbase.jul.exception.CouldNotPerformException
    • hasConfigField

      protected final boolean hasConfigField(String name) throws org.openbase.jul.exception.CouldNotPerformException
      Throws:
      org.openbase.jul.exception.CouldNotPerformException
    • supportsConfigField

      protected final boolean supportsConfigField(String name) throws org.openbase.jul.exception.CouldNotPerformException
      Throws:
      org.openbase.jul.exception.CouldNotPerformException
    • getConfig

      public CONFIG getConfig() throws org.openbase.jul.exception.NotAvailableException
      Specified by:
      getConfig in interface org.openbase.jul.iface.provider.ConfigProvider<M extends com.google.protobuf.Message>
      Specified by:
      getConfig in interface org.openbase.jul.pattern.controller.ConfigurableRemote<String,M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message>
      Returns:
    • getId

      public String getId() throws org.openbase.jul.exception.NotAvailableException
      Specified by:
      getId in interface org.openbase.jul.iface.Identifiable<M extends com.google.protobuf.Message>
      Overrides:
      getId in class AbstractIdentifiableRemote<M extends com.google.protobuf.Message>
      Returns:
    • getConfigClass

      public Class<CONFIG> getConfigClass()
      Specified by:
      getConfigClass in interface org.openbase.jul.pattern.controller.ConfigurableRemote<String,M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message>
      Returns:
    • addConfigObserver

      public void addConfigObserver(org.openbase.jul.pattern.Observer<org.openbase.jul.pattern.controller.ConfigurableRemote<String,M,CONFIG>,CONFIG> observer)
      Specified by:
      addConfigObserver in interface org.openbase.jul.pattern.controller.ConfigurableRemote<String,M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message>
      Parameters:
      observer -
    • removeConfigObserver

      public void removeConfigObserver(org.openbase.jul.pattern.Observer<org.openbase.jul.pattern.controller.ConfigurableRemote<String,M,CONFIG>,CONFIG> observer)
      Specified by:
      removeConfigObserver in interface org.openbase.jul.pattern.controller.ConfigurableRemote<String,M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message>
      Parameters:
      observer -
    • shutdown

      public void shutdown()
      This method deactivates the remote and cleans all resources.
      Specified by:
      shutdown in interface org.openbase.jul.iface.Manageable<M extends com.google.protobuf.Message>
      Specified by:
      shutdown in interface org.openbase.jul.iface.Shutdownable
      Overrides:
      shutdown in class AbstractRemoteClient<M extends com.google.protobuf.Message>