public abstract class ServiceRemoteManager<D> extends Object implements org.openbase.jul.iface.Activatable, org.openbase.jul.iface.Snapshotable<rst.domotic.action.SnapshotType.Snapshot>, org.openbase.jul.iface.provider.PingProvider, org.openbase.jul.pattern.provider.DataProvider<D>
| Constructor and Description |
|---|
ServiceRemoteManager(org.openbase.jul.pattern.provider.DataProvider<D> responsibleInstance) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addDataObserver(org.openbase.jul.pattern.Observer<D> observer) |
Future<rst.domotic.action.ActionFutureType.ActionFuture> |
applyAction(rst.domotic.action.ActionDescriptionType.ActionDescription actionDescription) |
void |
applyConfigUpdate(List<String> unitIDList) |
void |
deactivate() |
D |
getData() |
Class<D> |
getDataClass() |
CompletableFuture<D> |
getDataFuture() |
protected abstract Set<rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType> |
getManagedServiceTypes() |
Long |
getPing() |
AbstractServiceRemote |
getServiceRemote(rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType serviceType) |
List<AbstractServiceRemote> |
getServiceRemoteList() |
boolean |
isActive() |
boolean |
isDataAvailable() |
boolean |
isServiceAvailable(rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType serviceType)
Method checks if the given
ServiceType is currently available by this ServiceRemoteManager |
protected abstract void |
notifyServiceUpdate(org.openbase.jul.pattern.Observable source,
Object data) |
Future<Long> |
ping() |
Future<rst.domotic.action.SnapshotType.Snapshot> |
recordSnapshot() |
Future<rst.domotic.action.SnapshotType.Snapshot> |
recordSnapshot(rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType unitType) |
void |
removeDataObserver(org.openbase.jul.pattern.Observer<D> observer) |
<B> Future<B> |
requestData(B builder) |
Future<Void> |
restoreSnapshot(rst.domotic.action.SnapshotType.Snapshot snapshot) |
<B> B |
updateBuilderWithAvailableServiceStates(B builder) |
<B> B |
updateBuilderWithAvailableServiceStates(B builder,
Class dataClass,
Set<rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType> supportedServiceTypeSet) |
void |
waitForData() |
void |
waitForData(long timeout,
TimeUnit timeUnit) |
public ServiceRemoteManager(org.openbase.jul.pattern.provider.DataProvider<D> responsibleInstance)
public void applyConfigUpdate(List<String> unitIDList) throws org.openbase.jul.exception.CouldNotPerformException, InterruptedException
org.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionpublic void activate()
throws org.openbase.jul.exception.CouldNotPerformException,
InterruptedException
activate in interface org.openbase.jul.iface.Activatableorg.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionpublic void deactivate()
throws InterruptedException,
org.openbase.jul.exception.CouldNotPerformException
deactivate in interface org.openbase.jul.iface.ActivatableInterruptedExceptionorg.openbase.jul.exception.CouldNotPerformExceptionpublic boolean isActive()
isActive in interface org.openbase.jul.iface.Activatablepublic List<AbstractServiceRemote> getServiceRemoteList()
public boolean isServiceAvailable(rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType serviceType)
ServiceType is currently available by this ServiceRemoteManagerserviceType - the ServiceType to check.ServiceType is available, otherwise false.public AbstractServiceRemote getServiceRemote(rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType serviceType) throws org.openbase.jul.exception.NotAvailableException
org.openbase.jul.exception.NotAvailableExceptionpublic <B> B updateBuilderWithAvailableServiceStates(B builder)
throws InterruptedException,
org.openbase.jul.exception.CouldNotPerformException
InterruptedExceptionorg.openbase.jul.exception.CouldNotPerformExceptionpublic <B> B updateBuilderWithAvailableServiceStates(B builder,
Class dataClass,
Set<rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType> supportedServiceTypeSet)
throws InterruptedException
InterruptedExceptionpublic Future<rst.domotic.action.SnapshotType.Snapshot> recordSnapshot() throws org.openbase.jul.exception.CouldNotPerformException, InterruptedException
recordSnapshot in interface org.openbase.jul.iface.Snapshotable<rst.domotic.action.SnapshotType.Snapshot>org.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionpublic Future<rst.domotic.action.SnapshotType.Snapshot> recordSnapshot(rst.domotic.unit.UnitTemplateType.UnitTemplate.UnitType unitType) throws org.openbase.jul.exception.CouldNotPerformException, InterruptedException
org.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionpublic Future<Void> restoreSnapshot(rst.domotic.action.SnapshotType.Snapshot snapshot) throws org.openbase.jul.exception.CouldNotPerformException, InterruptedException
restoreSnapshot in interface org.openbase.jul.iface.Snapshotable<rst.domotic.action.SnapshotType.Snapshot>org.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionpublic Future<Long> ping()
ping in interface org.openbase.jul.iface.provider.PingProviderpublic Long getPing()
getPing in interface org.openbase.jul.iface.provider.PingProviderpublic Future<rst.domotic.action.ActionFutureType.ActionFuture> applyAction(rst.domotic.action.ActionDescriptionType.ActionDescription actionDescription) throws org.openbase.jul.exception.CouldNotPerformException, InterruptedException
org.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionprotected abstract Set<rst.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType> getManagedServiceTypes() throws org.openbase.jul.exception.NotAvailableException, InterruptedException
org.openbase.jul.exception.NotAvailableExceptionInterruptedExceptionprotected abstract void notifyServiceUpdate(org.openbase.jul.pattern.Observable source,
Object data)
throws org.openbase.jul.exception.NotAvailableException,
InterruptedException
org.openbase.jul.exception.NotAvailableExceptionInterruptedExceptionpublic boolean isDataAvailable()
isDataAvailable in interface org.openbase.jul.pattern.provider.DataProvider<D>public Class<D> getDataClass()
getDataClass in interface org.openbase.jul.pattern.provider.DataProvider<D>public D getData() throws org.openbase.jul.exception.NotAvailableException
getData in interface org.openbase.jul.pattern.provider.DataProvider<D>org.openbase.jul.exception.NotAvailableExceptionpublic CompletableFuture<D> getDataFuture()
getDataFuture in interface org.openbase.jul.pattern.provider.DataProvider<D>public void addDataObserver(org.openbase.jul.pattern.Observer<D> observer)
addDataObserver in interface org.openbase.jul.pattern.provider.DataProvider<D>public void removeDataObserver(org.openbase.jul.pattern.Observer<D> observer)
removeDataObserver in interface org.openbase.jul.pattern.provider.DataProvider<D>public void waitForData()
throws org.openbase.jul.exception.CouldNotPerformException,
InterruptedException
waitForData in interface org.openbase.jul.pattern.provider.DataProvider<D>org.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionpublic void waitForData(long timeout,
TimeUnit timeUnit)
throws org.openbase.jul.exception.CouldNotPerformException,
InterruptedException
waitForData in interface org.openbase.jul.pattern.provider.DataProvider<D>org.openbase.jul.exception.CouldNotPerformExceptionInterruptedExceptionpublic <B> Future<B> requestData(B builder) throws org.openbase.jul.exception.CouldNotPerformException
org.openbase.jul.exception.CouldNotPerformExceptionCopyright © 2014–2018 openbase.org. All rights reserved.