Class AbstractConfigurableRemote<M extends com.google.protobuf.Message,CONFIG extends com.google.protobuf.Message>
java.lang.Object
org.openbase.jul.communication.controller.AbstractRemoteClient<M>
org.openbase.jul.communication.controller.AbstractIdentifiableRemote<M>
org.openbase.jul.communication.controller.AbstractConfigurableRemote<M,CONFIG>
- 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>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openbase.jul.iface.Shutdownable
org.openbase.jul.iface.Shutdownable.ShutdownDaemon -
Field Summary
Fields inherited from class org.openbase.jul.communication.controller.AbstractRemoteClient
CONNECTION_TIMEOUT, logger, maintainer, METHOD_CALL_MAX_TIMEOUT, METHOD_CALL_START_TIMEOUT, METHOD_CALL_TIMEOUT_MULTIPLIER, PING_TEST_TIMEOUT, PING_TIMEOUT, RECONNECT_AFTER_CONNECTION_LOST_DELAY_OFFSET, RECONNECT_AFTER_CONNECTION_LOST_DELAY_SEED, REQUEST_TIMEOUT, scopeFields 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 TypeMethodDescriptionvoidaddConfigObserver(org.openbase.jul.pattern.Observer<org.openbase.jul.pattern.controller.ConfigurableRemote<String, M, CONFIG>, CONFIG> observer) applyConfigUpdate(CONFIG config) protected final ObjectgetConfigField(String name) protected final ObjectgetConfigField(String name, CONFIG config) getId()protected final booleanhasConfigField(String name) voidprotected voidnotifyConfigUpdate(CONFIG config) Method can be overwritten to get internally informed about config updates.voidremoveConfigObserver(org.openbase.jul.pattern.Observer<org.openbase.jul.pattern.controller.ConfigurableRemote<String, M, CONFIG>, CONFIG> observer) voidshutdown()This method deactivates the remote and cleans all resources.protected final booleansupportsConfigField(String name) Methods inherited from class org.openbase.jul.communication.controller.AbstractIdentifiableRemote
toStringMethods inherited from class org.openbase.jul.communication.controller.AbstractRemoteClient
activate, activate, activate, addConnectionStateObserver, addDataObserver, addHandler, applyEventUpdate, callMethod, callMethod, callMethod, callMethod, callMethodAsync, callMethodAsync, deactivate, deactivate, generateHandler, getConnectionState, getData, getDataClass, getDataField, getInternalPrioritizedDataObservable, getPing, getRpcClient, getScope, getTransactionId, hasDataField, init, init, init, internalRequestStatus, isActive, isConnected, isDataAvailable, isLocked, isSyncRunning, lock, ping, postInit, reinit, reinit, reinit, reinit, removeConnectionStateObserver, removeDataObserver, requestData, reset, restartSyncTask, setData, setMessageProcessor, unlock, validateActivation, validateAndUpdateEventTimestamp, validateData, validateInitialization, validateMiddleware, verifyMaintainability, waitForConnectionState, waitForConnectionState, waitForData, waitForData, waitForMiddleware, 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.ConfigurableRemote
isConfigAvailableMethods inherited from interface org.openbase.jul.pattern.provider.DataProvider
addDataObserver, isDataAvailable, removeDataObserver, validateDataMethods inherited from interface org.openbase.jul.iface.Lockable
isLocked, lock, unlock, verifyMaintainabilityMethods inherited from interface org.openbase.jul.pattern.controller.Remote
activate, activate, addConnectionStateObserver, getConnectionState, getData, getDataClass, getDataFuture, getPing, isConnected, ping, removeConnectionStateObserver, requestData, waitForConnectionState, waitForData, waitForData
-
Constructor Details
-
AbstractConfigurableRemote
-
-
Method Details
-
init
public void init(CONFIG config) throws org.openbase.jul.exception.InitializationException, InterruptedException - Specified by:
initin interfaceorg.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 -
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
- Specified by:
getConfigin interfaceorg.openbase.jul.iface.provider.ConfigProvider<M extends com.google.protobuf.Message>- Specified by:
getConfigin interfaceorg.openbase.jul.pattern.controller.ConfigurableRemote<String,M extends com.google.protobuf.Message, CONFIG extends com.google.protobuf.Message> - Returns:
-
getId
- Specified by:
getIdin interfaceorg.openbase.jul.iface.Identifiable<M extends com.google.protobuf.Message>- Overrides:
getIdin classAbstractIdentifiableRemote<M extends com.google.protobuf.Message>- Returns:
-
getConfigClass
-
addConfigObserver
-
removeConfigObserver
-
shutdown
public void shutdown()This method deactivates the remote and cleans all resources.- Specified by:
shutdownin interfaceorg.openbase.jul.iface.Manageable<M extends com.google.protobuf.Message>- Specified by:
shutdownin interfaceorg.openbase.jul.iface.Shutdownable- Overrides:
shutdownin classAbstractRemoteClient<M extends com.google.protobuf.Message>
-