Class AbstractConfigurableController<M extends com.google.protobuf.AbstractMessage,MB extends com.google.protobuf.AbstractMessage.Builder<MB>,CONFIG extends com.google.protobuf.Message>
java.lang.Object
org.openbase.jul.communication.controller.AbstractControllerServer<M,MB>
org.openbase.jul.communication.controller.AbstractIdentifiableController<M,MB>
org.openbase.jul.communication.controller.AbstractConfigurableController<M,MB,CONFIG>
- Type Parameters:
M- the message typeMB- builder of the message MCONFIG- the configuration data type
- All Implemented Interfaces:
org.openbase.jul.extension.protobuf.iface.DataBuilderProvider<M,,MB> org.openbase.jul.extension.type.iface.ScopeProvider,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.Manageable<CONFIG>,org.openbase.jul.iface.Pingable,org.openbase.jul.iface.provider.ConfigProvider<CONFIG>,org.openbase.jul.iface.Readyable,org.openbase.jul.iface.Requestable<M>,org.openbase.jul.iface.Shutdownable,org.openbase.jul.pattern.ChangeListener,org.openbase.jul.pattern.controller.ConfigurableController<String,,M, CONFIG> org.openbase.jul.pattern.controller.Controller<M>,org.openbase.jul.pattern.controller.IdentifiableController<String,,M> org.openbase.jul.pattern.controller.MessageController<M,,MB> org.openbase.jul.pattern.provider.DataProvider<M>
- Direct Known Subclasses:
AbstractEnableableConfigurableController
public abstract class AbstractConfigurableController<M extends com.google.protobuf.AbstractMessage,MB extends com.google.protobuf.AbstractMessage.Builder<MB>,CONFIG extends com.google.protobuf.Message>
extends AbstractIdentifiableController<M,MB>
implements org.openbase.jul.pattern.controller.ConfigurableController<String,M,CONFIG>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openbase.jul.iface.Shutdownable
org.openbase.jul.iface.Shutdownable.ShutdownDaemon -
Field Summary
FieldsFields inherited from class org.openbase.jul.communication.controller.AbstractControllerServer
dataLock, logger, publisher, publisherWatchDog, RPC_REQUEST_STATUS, scope, SCOPE_ELEMENT_SUFFIX_CONTROL, SCOPE_ELEMENT_SUFFIX_STATUS, SCOPE_SUFFIX_CONTROL, SCOPE_SUFFIX_STATUS, server, serverWatchDogFields inherited from interface org.openbase.jul.iface.Identifiable
TYPE_FIELD_IDFields inherited from interface org.openbase.jul.extension.type.iface.TransactionIdProvider
TRANSACTION_ID_FIELD_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyConfigUpdate(CONFIG config) Apply an update to the configuration of this controller.protected final ObjectgetConfigField(String name) protected final ObjectgetConfigField(String name, CONFIG config) protected final booleanhasConfigField(String name) voidInitialize the controller with a configuration.protected final booleansupportsConfigField(String name) Methods inherited from class org.openbase.jul.communication.controller.AbstractIdentifiableController
getIdMethods inherited from class org.openbase.jul.communication.controller.AbstractControllerServer
activate, addDataObserver, cloneDataBuilder, deactivate, generateTransactionId, getBuilderSetup, getControllerAvailabilityState, getData, getDataBuilder, getDataBuilder, getDataBuilderInterruptible, getDataBuilderInterruptible, getDataClass, getDataField, getDataFieldDescriptor, getDataFuture, getManageLock, getManageReadLock, getManageReadLockInterruptible, getManageWriteLock, getManageWriteLockInterruptible, getScope, getShutdownDelay, getTransactionId, hasDataField, init, init, init, isActive, isDataAvailable, isDataBuilderWriteLockedByCurrentThread, isReady, isShutdownInProgress, notifyChange, notifyDataUpdate, ping, postInit, registerMethods, removeDataObserver, requestStatus, setDataField, setDataField, shutdown, supportsDataField, toString, updateDataToPublish, updateTransactionId, validateActivation, validateData, validateInitialization, validateMiddleware, waitForAvailabilityState, waitForData, waitForData, waitForMiddlewareMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openbase.jul.iface.Activatable
activate, deactivate, isActiveMethods inherited from interface org.openbase.jul.pattern.controller.Controller
getControllerAvailabilityState, getData, getDataClass, notifyChange, waitForAvailabilityStateMethods inherited from interface org.openbase.jul.iface.Identifiable
getIdMethods inherited from interface org.openbase.jul.iface.Manageable
shutdownMethods inherited from interface org.openbase.jul.iface.Pingable
pingMethods inherited from interface org.openbase.jul.iface.Requestable
requestStatus
-
Field Details
-
FIELD_SCOPE
- See Also:
-
-
Constructor Details
-
AbstractConfigurableController
public AbstractConfigurableController(MB builder) throws org.openbase.jul.exception.InstantiationException - Throws:
org.openbase.jul.exception.InstantiationException
-
-
Method Details
-
init
public void init(CONFIG config) throws org.openbase.jul.exception.InitializationException, InterruptedException Initialize the controller with a configuration.- Specified by:
initin interfaceorg.openbase.jul.iface.Initializable<M extends com.google.protobuf.AbstractMessage>- Parameters:
config- the configuration- Throws:
org.openbase.jul.exception.InitializationException- if the initialization failsInterruptedException- if the initialization is interrupted
-
applyConfigUpdate
public CONFIG applyConfigUpdate(CONFIG config) throws org.openbase.jul.exception.CouldNotPerformException, InterruptedException Apply an update to the configuration of this controller.- Specified by:
applyConfigUpdatein interfaceorg.openbase.jul.iface.Configurable<M extends com.google.protobuf.AbstractMessage,MB extends com.google.protobuf.AbstractMessage.Builder<MB>> - Parameters:
config- the updated configuration- Returns:
- the updated configuration
- Throws:
org.openbase.jul.exception.CouldNotPerformException- if the update could not be performedInterruptedException- if the update has been interrupted
-
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
- Specified by:
getConfigin interfaceorg.openbase.jul.iface.provider.ConfigProvider<M extends com.google.protobuf.AbstractMessage>- Throws:
org.openbase.jul.exception.NotAvailableException
-