diff --git a/module/registry/unit-registry/core/src/main/java/org/openbase/bco/registry/unit/core/UnitRegistryController.java b/module/registry/unit-registry/core/src/main/java/org/openbase/bco/registry/unit/core/UnitRegistryController.java index 21ade6629d..5b3617b12c 100644 --- a/module/registry/unit-registry/core/src/main/java/org/openbase/bco/registry/unit/core/UnitRegistryController.java +++ b/module/registry/unit-registry/core/src/main/java/org/openbase/bco/registry/unit/core/UnitRegistryController.java @@ -46,7 +46,10 @@ import org.openbase.bco.registry.unit.core.consistency.sceneconfig.SceneServiceStateConsistencyHandler; import org.openbase.bco.registry.unit.core.consistency.sceneconfig.ServiceStateDescriptionHierarchyConsistencyHandler; import org.openbase.bco.registry.unit.core.consistency.unitgroupconfig.*; -import org.openbase.bco.registry.unit.core.consistency.userconfig.*; +import org.openbase.bco.registry.unit.core.consistency.userconfig.UserConfigLanguageConsistencyHandler; +import org.openbase.bco.registry.unit.core.consistency.userconfig.UserConfigUserNameConsistencyHandler; +import org.openbase.bco.registry.unit.core.consistency.userconfig.UserPermissionConsistencyHandler; +import org.openbase.bco.registry.unit.core.consistency.userconfig.UserUnitLabelConsistencyHandler; import org.openbase.bco.registry.unit.core.plugin.*; import org.openbase.bco.registry.unit.lib.UnitRegistry; import org.openbase.bco.registry.unit.lib.auth.AuthorizationWithTokenHelper; @@ -193,6 +196,22 @@ protected void postInit() throws InitializationException, InterruptedException { } } + @Override + public void activate() throws InterruptedException, CouldNotPerformException { + this.addDataObserver(clearUnitConfigsByTypeObserver); + CachedTemplateRegistryRemote.getRegistry().addDataObserver(clearUnitConfigsByTypeObserver); + + super.activate(); + } + + @Override + public void deactivate() throws InterruptedException, CouldNotPerformException { + this.removeDataObserver(clearUnitConfigsByTypeObserver); + CachedTemplateRegistryRemote.getRegistry().removeDataObserver(clearUnitConfigsByTypeObserver); + + super.deactivate(); + } + /** * {@inheritDoc} */ @@ -553,9 +572,7 @@ public UnitConfig getUnitConfigById(final String unitConfigId) throws NotAvailab * {@inheritDoc} * * @param unitAlias {@inheritDoc} - * * @return {@inheritDoc} - * * @throws NotAvailableException {@inheritDoc} */ @Override @@ -577,9 +594,7 @@ public UnitConfig getUnitConfigByAlias(final String unitAlias) throws NotAvailab * * @param unitAlias {@inheritDoc} * @param unitType {@inheritDoc} - * * @return {@inheritDoc} - * * @throws NotAvailableException {@inheritDoc} */ @Override @@ -659,9 +674,7 @@ public Future removeUnitConfigAuthenticated(final Authentica * {@inheritDoc} * * @param filterDisabledUnits {@inheritDoc} - * * @return {@inheritDoc} - * * @throws CouldNotPerformException {@inheritDoc} * @throws NotAvailableException {@inheritDoc} */ @@ -685,7 +698,6 @@ public List getUnitConfigsFiltered(boolean filterDisabledUnits) thro * {@inheritDoc} * * @return {@inheritDoc} - * * @throws CouldNotPerformException {@inheritDoc} */ @Override @@ -697,7 +709,6 @@ public List getDalUnitConfigs() throws CouldNotPerformException { * {@inheritDoc} * * @return {@inheritDoc} - * * @throws CouldNotPerformException {@inheritDoc} */ @Override @@ -748,9 +759,7 @@ public Boolean isUnitGroupConfigRegistryConsistent() { * {@inheritDoc} * * @param serviceType - * * @return - * * @throws CouldNotPerformException */ @Override @@ -771,9 +780,7 @@ public List getServiceConfigsByServiceType(final ServiceType serv * * @param unitType * @param serviceTypes - * * @return - * * @throws CouldNotPerformException */ @Override @@ -1041,7 +1048,6 @@ protected UnitRegistryData filterDataForUser(final UnitRegistryData.Builder data * {@inheritDoc} * * @param authorizationToken {@inheritDoc} - * * @return {@inheritDoc} */ @Override @@ -1060,7 +1066,6 @@ public Future requestAuthorizationToken(final AuthorizationToken authori * {@inheritDoc} * * @param authenticatedValue {@inheritDoc} - * * @return {@inheritDoc} */ @Override diff --git a/module/registry/unit-registry/lib/src/main/java/org/openbase/bco/registry/unit/lib/UnitRegistry.java b/module/registry/unit-registry/lib/src/main/java/org/openbase/bco/registry/unit/lib/UnitRegistry.java index ee529ecc67..d46caff53b 100644 --- a/module/registry/unit-registry/lib/src/main/java/org/openbase/bco/registry/unit/lib/UnitRegistry.java +++ b/module/registry/unit-registry/lib/src/main/java/org/openbase/bco/registry/unit/lib/UnitRegistry.java @@ -10,12 +10,12 @@ * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * + * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * . @@ -31,7 +31,6 @@ import org.openbase.bco.registry.lib.provider.UnitConfigCollectionProvider; import org.openbase.bco.registry.lib.util.UnitConfigProcessor; import org.openbase.bco.registry.template.remote.CachedTemplateRegistryRemote; -import org.openbase.bco.registry.unit.lib.filter.UnitConfigFilter; import org.openbase.bco.registry.unit.lib.filter.UnitConfigFilterImpl; import org.openbase.bco.registry.unit.lib.provider.UnitTransformationProviderRegistry; import org.openbase.jul.annotation.RPCMethod; @@ -43,11 +42,12 @@ import org.openbase.jul.iface.Shutdownable; import org.openbase.jul.pattern.Filter; import org.openbase.jul.pattern.ListFilter; +import org.openbase.jul.pattern.Observer; import org.openbase.jul.pattern.provider.DataProvider; import org.openbase.jul.schedule.GlobalCachedExecutorService; +import org.openbase.jul.schedule.SyncObject; import org.openbase.jul.storage.registry.RegistryService; import org.openbase.type.communication.ScopeType.Scope; -import org.openbase.type.domotic.action.ActionDescriptionType.ActionDescription; import org.openbase.type.domotic.authentication.AuthenticatedValueType.AuthenticatedValue; import org.openbase.type.domotic.authentication.AuthenticationTokenType.AuthenticationToken; import org.openbase.type.domotic.authentication.AuthorizationTokenType.AuthorizationToken; @@ -55,7 +55,6 @@ import org.openbase.type.domotic.service.ServiceConfigType; import org.openbase.type.domotic.service.ServiceConfigType.ServiceConfig; import org.openbase.type.domotic.service.ServiceDescriptionType.ServiceDescription; -import org.openbase.type.domotic.service.ServiceStateDescriptionType.ServiceStateDescription; import org.openbase.type.domotic.service.ServiceTemplateType.ServiceTemplate.ServicePattern; import org.openbase.type.domotic.service.ServiceTemplateType.ServiceTemplate.ServiceType; import org.openbase.type.domotic.unit.UnitConfigType.UnitConfig; @@ -72,7 +71,6 @@ import javax.media.j3d.Transform3D; import javax.vecmath.Point3d; -import java.rmi.ServerError; import java.util.*; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -107,13 +105,28 @@ public interface UnitRegistry extends DataProvider, UnitTransf * The default radius used for the unit by coordinate lookup is set to 1 metre. */ double DEFAULT_RADIUS = 1d; + /** + * Cache of unit configs by type. + */ + Map> unitConfigsByType = new HashMap<>(); + /** + * Lock to synchronize access to unit configs by type cache. + */ + SyncObject unitConfigsByTypeMapLock = new SyncObject("unitConfigsByTypeMapLock"); + /** + * Observer which may be registered to clear the unit configs by type cache on changes. + */ + Observer clearUnitConfigsByTypeObserver = (source, data) -> { + synchronized (unitConfigsByTypeMapLock) { + unitConfigsByType.clear(); + } + }; /** * This method registers the given unit config in the registry. * Future get canceled if the entry already exists or results in an inconsistent registry * * @param unitConfig the unit config to register. - * * @return the registered unit config with all applied consistency changes. */ @RPCMethod @@ -126,7 +139,6 @@ public interface UnitRegistry extends DataProvider, UnitTransf * Method updates the given unit config. * * @param unitConfig the updated unit config. - * * @return the updated unit config with all applied consistency changes. */ @RPCMethod @@ -139,7 +151,6 @@ public interface UnitRegistry extends DataProvider, UnitTransf * Method removes the given unit config out of the global registry. * * @param unitConfig the unit config to remove. - * * @return The removed unit config. */ @RPCMethod @@ -154,7 +165,6 @@ public interface UnitRegistry extends DataProvider, UnitTransf * comparison. * * @param unitConfig the unit config used for the identification. - * * @return true if the unit exists or false if the entry does not exists or the registry is not available. */ @RPCMethod @@ -223,15 +233,12 @@ default String getUnitScopeByAlias(final String alias) throws CouldNotPerformExc * Hint: If you want to address more than one unit with an alias than create a unit group of such units and define an alias for those group. * * @param unitAlias the alias to identify the unit. - * * @return the unit config referred by the alias. - * * @throws NotAvailableException is thrown if no unit is matching the given alias. */ @RPCMethod UnitConfig getUnitConfigByAlias(final String unitAlias) throws NotAvailableException; - /** * Method returns the unit matching the given alias. An alias is a unique identifier of units. *

@@ -239,9 +246,7 @@ default String getUnitScopeByAlias(final String alias) throws CouldNotPerformExc * * @param unitAlias the alias to identify the unit. * @param unitType the type to validate the resulting unit. - * * @return the unit config referred by the alias. - * * @throws NotAvailableException is thrown if no unit is matching the given alias. * @deprecated please use getUnitConfigByAliasAndUnitType(...) instead. */ @@ -257,9 +262,7 @@ default UnitConfig getUnitConfigByAlias(String unitAlias, final UnitType unitTyp * * @param unitAlias the alias to identify the unit. * @param unitType the type to validate the resulting unit. - * * @return the unit config referred by the alias. - * * @throws NotAvailableException is thrown if no unit is matching the given alias. */ UnitConfig getUnitConfigByAliasAndUnitType(String unitAlias, final UnitType unitType) throws NotAvailableException; @@ -271,9 +274,7 @@ default UnitConfig getUnitConfigByAlias(String unitAlias, final UnitType unitTyp * Note: PLEASE DO NOT USE THIS METHOD TO REQUEST DEVICES FOR THE CONTROLLING PURPOSE BECAUSE LABELS ARE NOT A STABLE IDENTIFIER! USE ID OR ALIAS INSTEAD! * * @param unitConfigLabel the label to identify a set of units. - * * @return a list of the requested unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLabel(final String unitConfigLabel) throws CouldNotPerformException { @@ -296,26 +297,12 @@ default List getUnitConfigsByLabelAndUnitType(final String unitConfi return unitConfigs; } - /** - * Method returns a list of all globally registered units of the given {@code type}. - *

- * Note: The type {@code UnitType.UNKNOWN} is used as wildcard and will return a list of all registered units. - * - * @param unitType the unit type to filter. - * - * @return a list of unit configurations. - * - * @throws CouldNotPerformException is thrown in case something goes wrong during the request. - */ - /** * Method returns all registered unit configs. It allows to filter unit configs. * * @param includeDisabledUnits if true all unit configs that are disabled will be included as well. - * @param unitFilter if set, only units that match the filter will be returned. - * + * @param unitFilter if set, only units that match the filter will be returned. * @return the unit config collection as queried. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigs(final boolean includeDisabledUnits, final UnitFilter unitFilter) throws CouldNotPerformException { @@ -326,9 +313,7 @@ default List getUnitConfigs(final boolean includeDisabledUnits, fina * Method returns all registered unit configs. It allows to filter unit configs. * * @param unitFilter if set, only units that match the filter will be returned. - * * @return the unit config collection as queried. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigs(final UnitFilter unitFilter) throws CouldNotPerformException { @@ -339,10 +324,8 @@ default List getUnitConfigs(final UnitFilter unitFilter) throws Coul * Method returns all registered unit configs. It allows to filter unit configs. * * @param includeDisabledUnits if true all unit configs that are disabled will be included as well. - * @param unitFilter if set, only units that match the filter will be returned. - * + * @param unitFilter if set, only units that match the filter will be returned. * @return the unit config collection as queried. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigs(final boolean includeDisabledUnits, final Filter unitFilter) throws CouldNotPerformException { @@ -354,9 +337,7 @@ default List getUnitConfigs(final boolean includeDisabledUnits, fina * Method returns all registered unit configs. It allows to filter unit configs. * * @param unitFilter if set, only units that match the filter will be returned. - * * @return the unit config collection as queried. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigs(final Filter unitFilter) throws CouldNotPerformException { @@ -367,10 +348,8 @@ default List getUnitConfigs(final Filter unitFilter) thr * Method returns all registered unit configs. It allows to filter unit configs. * * @param includeDisabledUnits if true all unit configs that are disabled will be included as well. - * @param unitFilter if set, only units that match the filter will be returned. - * + * @param unitFilter if set, only units that match the filter will be returned. * @return the unit config collection as queried. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigs(final boolean includeDisabledUnits, final ListFilter unitFilter) throws CouldNotPerformException { @@ -381,9 +360,7 @@ default List getUnitConfigs(final boolean includeDisabledUnits, fina * Method returns all registered unit configs. It allows to filter unit configs. * * @param unitFilter if set, only units that match the filter will be returned. - * * @return the unit config collection as queried. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigs(final ListFilter unitFilter) throws CouldNotPerformException { @@ -394,9 +371,7 @@ default List getUnitConfigs(final ListFilter unitFilter) * Method returns all registered unit configs. It allows to filter unit configs. * * @param includeDisabledUnits if true all unit configs that are disabled will be included as well. - * * @return the unit config collection as queried. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigs(final boolean includeDisabledUnits) throws CouldNotPerformException { @@ -409,9 +384,7 @@ default List getUnitConfigs(final boolean includeDisabledUnits) thro * Note: The type {@code UnitType.UNKNOWN} is used as wildcard and will return a list of all registered units. * * @param unitType the unit type to filter. - * * @return a list of unit configurations. - * * @throws CouldNotPerformException is thrown in case something goes wrong during the request. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByUnitType(...) instead. */ @@ -426,20 +399,25 @@ default List getUnitConfigs(final UnitType unitType) throws CouldNot * Note: The type {@code UnitType.UNKNOWN} is used as wildcard and will return a list of all registered units. * * @param unitType the unit type to filter. - * * @return a list of unit configurations. - * * @throws CouldNotPerformException is thrown in case something goes wrong during the request. */ default List getUnitConfigsByUnitType(final UnitType unitType) throws CouldNotPerformException { validateData(); - List unitConfigs = new ArrayList<>(); - for (UnitConfig unitConfig : getUnitConfigs()) { - if (unitType == UnitType.UNKNOWN || unitConfig.getUnitType() == unitType || CachedTemplateRegistryRemote.getRegistry().getSubUnitTypes(unitType).contains(unitConfig.getUnitType())) { - unitConfigs.add(unitConfig); + + synchronized (unitConfigsByTypeMapLock) { + if (!unitConfigsByType.containsKey(unitType)) { + List unitConfigs = new ArrayList<>(); + for (UnitConfig unitConfig : getUnitConfigs()) { + if (unitType == UnitType.UNKNOWN || unitConfig.getUnitType() == unitType || CachedTemplateRegistryRemote.getRegistry().getSubUnitTypes(unitType).contains(unitConfig.getUnitType())) { + unitConfigs.add(unitConfig); + } + } + unitConfigsByType.put(unitType, unitConfigs); } + + return unitConfigsByType.get(unitType); } - return unitConfigs; } /** @@ -449,9 +427,7 @@ default List getUnitConfigsByUnitType(final UnitType unitType) throw * * @param unitType the unit type to filter. * @param filterDisabledUnits if flag is true only enabled units are returned, otherwise all unit are returned. - * * @return a list of unit configurations. - * * @throws CouldNotPerformException is thrown in case something goes wrong during the request. */ default List getUnitConfigsByUnitTypeFiltered(final UnitType unitType, final boolean filterDisabledUnits) throws CouldNotPerformException { @@ -471,7 +447,6 @@ default List getUnitConfigsByUnitTypeFiltered(final UnitType unitTyp * Base units are units of the following types: LOCATION, CONNECTION, SCENE, AGENT, APP, DEVICE, USER, AUTHORIZATION_GROUP, UNIT_GROUP * * @return a list of dal units. - * * @throws CouldNotPerformException is thrown in case something goes wrong during the request. */ List getDalUnitConfigs() throws CouldNotPerformException; @@ -481,14 +456,12 @@ default List getUnitConfigsByUnitTypeFiltered(final UnitType unitTyp * Base units are units of the following types: LOCATION, CONNECTION, SCENE, AGENT, APP, DEVICE, USER, AUTHORIZATION_GROUP, UNIT_GROUP * * @return a list of base units. - * * @throws CouldNotPerformException is thrown in case something goes wrong during the request. */ List getBaseUnitConfigs() throws CouldNotPerformException; /** * @return a list containing all service configs of all units. - * * @throws CouldNotPerformException is thrown if the config list could not be generated. */ default List getServiceConfigs() throws CouldNotPerformException { @@ -503,9 +476,7 @@ default List getServiceConfigs() throws CouldNotPerformException * Method returns all service configs of all units filtered by the given {@code serviceType}. * * @param serviceType the service type to filter. - * * @return a list of service configs matching the given {@code serviceType}. - * * @throws CouldNotPerformException is thrown if the config list could not be generated. * @deprecated please use getServiceConfigsByServiceType(...) instead. */ @@ -518,9 +489,7 @@ default List getServiceConfigs(final ServiceType serviceType) thr * Method returns all service configs of all units filtered by the given {@code serviceType}. * * @param serviceType the service type to filter. - * * @return a list of service configs matching the given {@code serviceType}. - * * @throws CouldNotPerformException is thrown if the config list could not be generated. */ default List getServiceConfigsByServiceType(final ServiceType serviceType) throws CouldNotPerformException { @@ -552,9 +521,7 @@ default List getServiceConfigsByServiceType(final ServiceType ser * * @param unitType the unit type to filter. * @param serviceType the service type to filter. - * * @return a list of unit types matching the given unit and service type. - * * @throws CouldNotPerformException is thrown if the list could not be generated. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByUnitTypeAndServiceType(...) instead. */ @@ -568,9 +535,7 @@ default List getUnitConfigsByUnitTypeAndServiceTypes(final UnitType * * @param unitType the unit type to filter. * @param serviceType the service type to filter. - * * @return a list of unit types matching the given unit and service type. - * * @throws CouldNotPerformException is thrown if the list could not be generated. */ default List getUnitConfigsByUnitTypeAndServiceType(final UnitType unitType, final ServiceType serviceType) throws CouldNotPerformException { @@ -596,9 +561,7 @@ default List getUnitConfigsByUnitTypeAndServiceType(final UnitType u * * @param unitType the unit type to filter. * @param serviceTypes a list of service types to filter. - * * @return a list of unit types matching the given unit and service type. - * * @throws CouldNotPerformException is thrown if the list could not be generated. */ default List getUnitConfigsByUnitTypeAndServiceTypes(final UnitType unitType, final List serviceTypes) throws CouldNotPerformException { @@ -625,9 +588,7 @@ default List getUnitConfigsByUnitTypeAndServiceTypes(final UnitType * Method returns a list of all unit group configs where the given unit config is a member of the group. * * @param unitConfig the unit config used to identify the member unit. - * * @return a list of unit group configs. - * * @throws CouldNotPerformException is thrown if the list could not be generated. */ default List getUnitGroupUnitConfigsByUnitConfig(final UnitConfig unitConfig) throws CouldNotPerformException { @@ -638,9 +599,7 @@ default List getUnitGroupUnitConfigsByUnitConfig(final UnitConfig un * Method returns a list of all unit group configs where the given unit is a member of the group. * * @param unitId the unit id defining the member unit. - * * @return a list of unit group configs. - * * @throws CouldNotPerformException is thrown if the list could not be generated. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitGroupUnitConfigsByUnitId(...) instead. */ @@ -654,9 +613,7 @@ default List getUnitGroupUnitConfigsByUnitConfig(final String unitId * Method returns a list of all unit group configs where the given unit is a member of the group. * * @param unitId the unit id defining the member unit. - * * @return a list of unit group configs. - * * @throws CouldNotPerformException is thrown if the list could not be generated. */ default List getUnitGroupUnitConfigsByUnitId(final String unitId) throws CouldNotPerformException { @@ -673,9 +630,7 @@ default List getUnitGroupUnitConfigsByUnitId(final String unitId) th * Method returns a list of all unit group configs which are providing at least one member of the given {@code unitType}. * * @param unitType the unit type to filter the groups. - * * @return a list of unit group configs. - * * @throws CouldNotPerformException is thrown if the list could not be generated. */ default List getUnitGroupUnitConfigsByUnitType(final UnitType unitType) throws CouldNotPerformException { @@ -692,9 +647,7 @@ default List getUnitGroupUnitConfigsByUnitType(final UnitType unitTy * Method returns all unit configs filtered by the given {@code serviceType}. * * @param serviceType the service types to filter. - * * @return a list of unit types matching the given service types. - * * @throws CouldNotPerformException is thrown if the list could not be generated. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitGroupUnitConfigsByServiceType(...) instead. */ @@ -707,9 +660,7 @@ default List getUnitGroupUnitConfigsByServiceTypes(final ServiceType * Method returns all unit configs filtered by the given {@code serviceType}. * * @param serviceType the service types to filter. - * * @return a list of unit types matching the given service types. - * * @throws CouldNotPerformException is thrown if the list could not be generated. */ default List getUnitGroupUnitConfigsByServiceType(final ServiceType serviceType) throws CouldNotPerformException { @@ -729,9 +680,7 @@ default List getUnitGroupUnitConfigsByServiceType(final ServiceType * Method returns all unit configs filtered by the given {@code serviceTypes}. * * @param serviceTypes a list of service types to filter. - * * @return a list of unit types matching the given service types. - * * @throws CouldNotPerformException is thrown if the list could not be generated. */ default List getUnitGroupUnitConfigsByServiceTypes(final List serviceTypes) throws CouldNotPerformException { @@ -755,9 +704,7 @@ default List getUnitGroupUnitConfigsByServiceTypes(final List getUnitConfigsByUnitGroupConfig(final UnitConfig unitGroupUnitConfig) throws CouldNotPerformException { @@ -775,9 +722,7 @@ default List getUnitConfigsByUnitGroupConfig(final UnitConfig unitGr * given scope. * * @param scope the scope of the unit used as identifier. - * * @return the unit config matching the given scope. - * * @throws CouldNotPerformException */ @RPCMethod @@ -792,7 +737,6 @@ default UnitConfig getUnitConfigByScope(final Scope scope) throws CouldNotPerfor /** * @param unitConfig - * * @throws VerificationFailedException * @deprecated since 2.0 and will be removed in 3.0: please use UnitConfigProcessor.verifyUnitConfig(unitConfig, UnitType.UNIT_GROUP) instead. */ @@ -1094,7 +1038,6 @@ default Future> getUnitConfigsByCoordinate(final Vec3DDouble co * * @param coordinate the center of the sphere. * @param radius the radius of the sphere. - * * @return all units included in the sphere. */ default Future> getUnitConfigsByCoordinateAndRadius(final Vec3DDouble coordinate, final double radius) { @@ -1109,7 +1052,6 @@ default Future> getUnitConfigsByCoordinateAndRadius(final Vec3D * @param coordinate the center of the sphere. * @param radius the radius of the sphere. * @param unitType filter lets only pass units of this declared type. - * * @return all units placed in the sphere. */ default Future> getUnitConfigsByCoordinateAndRadiusAndUnitType(final Vec3DDouble coordinate, final double radius, final UnitType unitType) { @@ -1136,9 +1078,7 @@ default Future> getUnitConfigsByCoordinateAndRadiusAndUnitType( * If multiple users happen to have the same user name, the first one is returned. * * @param userName - * * @return User ID - * * @throws CouldNotPerformException * @throws NotAvailableException If no user with the given user name could be found. */ @@ -1159,9 +1099,7 @@ default String getUserUnitIdByUserName(final String userName) throws CouldNotPer * Method returns all location unit configs which are of the given location type. * * @param locationType the type of the location. - * * @return a list of the requested unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getLocationUnitConfigsByLocationType(...) instead. */ @@ -1174,9 +1112,7 @@ default List getLocationUnitConfigsByType(final LocationType locatio * Method returns all location unit configs which are of the given location type. * * @param locationType the type of the location. - * * @return a list of the requested unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getLocationUnitConfigsByLocationType(final LocationType locationType) throws CouldNotPerformException { @@ -1193,7 +1129,6 @@ default List getLocationUnitConfigsByLocationType(final LocationType * Call to {@link #getLocationUnitConfigsByCoordinateAndLocationType(Vec3DDouble, LocationType)} with location type unknown. * * @param coordinate the coordinate for which it is checked if it is inside a location. - * * @return a list of the requested unit configs sorted by location type. */ default Future> getLocationUnitConfigsByCoordinate(final Vec3DDouble coordinate) { @@ -1208,7 +1143,6 @@ default Future> getLocationUnitConfigsByCoordinate(final Vec3DD * * @param coordinate the coordinate for which it is checked if it is inside a location * @param locationType the type of locations checked, unknown means all locations - * * @return a future of a list of the requested unit configs sorted by location type */ default Future> getLocationUnitConfigsByCoordinateAndLocationType(final Vec3DDouble coordinate, final LocationType locationType) { @@ -1295,9 +1229,7 @@ default Future> getLocationUnitConfigsByCoordinateAndLocationTy * Method returns all unit configurations which are direct or recursive related to the given location id. * * @param locationId the id of the location which provides the units. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByLocationId(...) instead. */ @@ -1310,9 +1242,7 @@ default List getUnitConfigsByLocationIdAndUnitType(final String loca * Method returns all unit configurations which are direct or recursive related to the given location id. * * @param locationId the id of the location which provides the units. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationId(final String locationId) throws CouldNotPerformException { @@ -1325,9 +1255,7 @@ default List getUnitConfigsByLocationId(final String locationId) thr * * @param locationId the id of the location which provides the units. * @param recursive defines if recursive related unit should be included as well. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByLocationIdRecursive(...) instead. */ @@ -1342,9 +1270,7 @@ default List getUnitConfigsByLocation(final String locationId, final * * @param locationId the id of the location which provides the units. * @param recursive defines if recursive related unit should be included as well. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationIdRecursive(final String locationId, final boolean recursive) throws CouldNotPerformException { @@ -1365,9 +1291,7 @@ default List getUnitConfigsByLocationIdRecursive(final String locati * * @param unitType the unit type after which unit configs are filtered. * @param locationId the location inside which unit configs are resolved. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByLocationIdAndUnitType(...) instead. */ @@ -1383,9 +1307,7 @@ default List getUnitConfigsByLocation(final UnitType unitType, final * * @param unitType the unit type after which unit configs are filtered. * @param locationId the location inside which unit configs are resolved. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationIdAndUnitType(final String locationId, final UnitType unitType) throws CouldNotPerformException { @@ -1402,9 +1324,7 @@ default List getUnitConfigsByLocationIdAndUnitType(final String loca * @param unitType the unit type after which unit configs are filtered. * @param locationId the location inside which unit configs are resolved. * @param recursive defines if recursive related unit should be included as well. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationIdAndUnitTypeRecursive(final String locationId, final UnitType unitType, final boolean recursive) throws CouldNotPerformException { @@ -1419,9 +1339,7 @@ default List getUnitConfigsByLocationIdAndUnitTypeRecursive(final St * @param unitType the unit type after which unit configs are filtered. * @param locationId the location inside which unit configs are resolved. * @param recursive defines if recursive related unit should be included as well. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationIdAndUnitTypeInclusiveSuperTypeRecursive(final String locationId, final UnitType unitType, final boolean inclusiveSuperType, final boolean recursive) throws CouldNotPerformException { @@ -1469,9 +1387,7 @@ default List getUnitConfigsByLocationIdAndUnitTypeInclusiveSuperType * * @param type service type filter. * @param locationConfigId related location. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByLocationIdAndServiceType(...) instead. @@ -1487,9 +1403,7 @@ default List getUnitConfigsByLocation(final ServiceType type, final * * @param locationConfigId related location. * @param serviceType service type filter. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException */ @@ -1500,7 +1414,7 @@ default List getUnitConfigsByLocationIdAndServiceType(final String l for (String unitConfigId : getUnitConfigById(locationConfigId).getLocationConfig().getUnitIdList()) { try { unitConfig = getUnitConfigById(unitConfigId); - if(isServiceAvailable(serviceType, unitConfig)) { + if (isServiceAvailable(serviceType, unitConfig)) { unitConfigList.add(unitConfig); } } catch (CouldNotPerformException ex) { @@ -1513,7 +1427,7 @@ default List getUnitConfigsByLocationIdAndServiceType(final String l default boolean isServiceAvailable(final ServiceType serviceType, final UnitConfig unitConfig) { for (ServiceConfig serviceConfig : unitConfig.getServiceConfigList()) { - if(serviceConfig.getServiceDescription().getPattern() != ServicePattern.PROVIDER) { + if (serviceConfig.getServiceDescription().getPattern() != ServicePattern.PROVIDER) { continue; } @@ -1528,33 +1442,33 @@ default boolean isServiceAvailable(final ServiceType serviceType, final UnitConf switch (unitConfig.getUnitType()) { case LOCATION: - if(unitConfig - .getLocationConfig() - .getUnitIdList() - .stream() - .anyMatch(it -> { - try { - if(it.equals(unitConfig.getId())) { - new FatalImplementationErrorException("Location "+LabelProcessor.getBestMatch(unitConfig.getLabel())+" refers it self as child unit!", this); + if (unitConfig + .getLocationConfig() + .getUnitIdList() + .stream() + .anyMatch(it -> { + try { + if (it.equals(unitConfig.getId())) { + new FatalImplementationErrorException("Location " + LabelProcessor.getBestMatch(unitConfig.getLabel()) + " refers it self as child unit!", this); + return false; + } + return isServiceAvailable(serviceType, getUnitConfigById(it)); + } catch (NotAvailableException exception) { return false; } - return isServiceAvailable(serviceType, getUnitConfigById(it)); - } catch (NotAvailableException exception) { - return false; - } - })) { + })) { return true; } break; case UNIT_GROUP: - if(unitConfig + if (unitConfig .getUnitGroupConfig() .getMemberIdList() .stream() .anyMatch(it -> { try { - if(it.equals(unitConfig.getId())) { - new FatalImplementationErrorException("Unit Group "+LabelProcessor.getBestMatch(unitConfig.getLabel())+" refers it self as member unit!", this); + if (it.equals(unitConfig.getId())) { + new FatalImplementationErrorException("Unit Group " + LabelProcessor.getBestMatch(unitConfig.getLabel()) + " refers it self as member unit!", this); return false; } return isServiceAvailable(serviceType, getUnitConfigById(it)); @@ -1567,7 +1481,7 @@ default boolean isServiceAvailable(final ServiceType serviceType, final UnitConf break; default: new FatalImplementationErrorException( - "Unit["+LabelProcessor.getBestMatch(unitConfig.getLabel(), "?")+"] provides an aggregated service thats not allowed for units of type: "+ unitConfig.getUnitType().name() + "Unit[" + LabelProcessor.getBestMatch(unitConfig.getLabel(), "?") + "] provides an aggregated service thats not allowed for units of type: " + unitConfig.getUnitType().name() , this ); } @@ -1580,9 +1494,7 @@ default boolean isServiceAvailable(final ServiceType serviceType, final UnitConf * related to the given location id. * * @param locationId - * * @return the list of service configurations. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException is thrown if the given location config id * is unknown. @@ -1598,9 +1510,7 @@ default List getServiceConfigsByLocation(final String locationId) * related to the given location id. * * @param locationId - * * @return the list of service configurations. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException is thrown if the given location config id * is unknown. @@ -1619,9 +1529,7 @@ default List getServiceConfigsByLocationId(final String locationI * related to the given location alias. * * @param locationAlias the alias to identify the location. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationAlias(final String locationAlias) throws CouldNotPerformException { @@ -1639,9 +1547,7 @@ default List getUnitConfigsByLocationAlias(final String locationAlia * * @param unitLabel the label tested * @param locationId the id of the location from which units are returned - * * @return a list of unit configs containing the given label withing the given location - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByLocationIdAndUnitLabel(...) instead. */ @@ -1657,9 +1563,7 @@ default List getUnitConfigsByLabelAndLocation(final String unitLabel * * @param unitLabel the label tested * @param locationId the id of the location from which units are returned - * * @return a list of unit configs containing the given label withing the given location - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationIdAndUnitLabel(final String locationId, final String unitLabel) throws CouldNotPerformException { @@ -1676,9 +1580,7 @@ default List getUnitConfigsByLocationIdAndUnitLabel(final String loc * @param unitLabel the label tested * @param locationId the id of the location from which units are returned * @param recursive flag determining if the whole location tree should be considered - * * @return a list of unit configs containing the given label withing the given location - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByLocationIdAndUnitLabelRecursive(...) instead. */ @@ -1697,9 +1599,7 @@ default List getUnitConfigsByLabelAndLocation(final String unitLabel * @param locationId the id of the location from which units are returned * @param unitLabel the label tested * @param recursive flag determining if the whole location tree should be considered - * * @return a list of unit configs containing the given label withing the given location - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByLocationIdAndUnitLabelRecursive(final String locationId, final String unitLabel, final boolean recursive) throws CouldNotPerformException { @@ -1719,9 +1619,7 @@ default List getUnitConfigsByLocationIdAndUnitLabelRecursive(final S * * @param unitType * @param locationAlias - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByLocationAliasAndUnitType(...) instead. @@ -1738,9 +1636,7 @@ default List getUnitConfigsByLocationAlias(final UnitType unitType, * * @param unitType * @param locationAlias - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException */ @@ -1756,9 +1652,7 @@ default List getUnitConfigsByLocationAliasAndUnitType(final String l * Method generates a list of service types supported by the given location. * * @param locationId the location to filter the types. - * * @return a list of supported service types. - * * @throws NotAvailableException is thrown in case the list could not be computed. * @deprecated since 2.0 and will be removed in 3.0: please use getServiceTypesByLocationId(...) instead. */ @@ -1771,9 +1665,7 @@ default Set getServiceTypesByLocation(final String locationId) thro * Method generates a list of service types supported by the given location. * * @param locationId the location to filter the types. - * * @return a list of supported service types. - * * @throws NotAvailableException is thrown in case the list could not be computed. */ default Set getServiceTypesByLocationId(final String locationId) throws CouldNotPerformException { @@ -1791,9 +1683,7 @@ default Set getServiceTypesByLocationId(final String locationId) th * connection id. * * @param connectionConfigId - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByConnectionId(...) instead. */ @@ -1807,9 +1697,7 @@ default List getUnitConfigsByConnection(final String connectionConfi * connection id. * * @param connectionConfigId - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getUnitConfigsByConnectionId(final String connectionConfigId) throws CouldNotPerformException { @@ -1826,9 +1714,7 @@ default List getUnitConfigsByConnectionId(final String connectionCon * * @param type * @param connectionConfigId - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByConnectionIdAndUnitType(...) instead. @@ -1844,9 +1730,7 @@ default List getUnitConfigsByConnection(final UnitType type, final S * * @param connectionConfigId * @param unitType - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException */ @@ -1873,9 +1757,7 @@ default List getUnitConfigsByConnectionIdAndUnitType(final String co * * @param type service type filter. * @param connectionConfigId related connection. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException * @deprecated since 2.0 and will be removed in 3.0: please use getUnitConfigsByConnectionIdAndServiceType(...) instead. @@ -1891,9 +1773,7 @@ default List getUnitConfigsByConnection(final ServiceType type, fina * * @param connectionConfigId related connection. * @param serviceType service type filter. - * * @return A collection of unit configs. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException */ @@ -1922,9 +1802,7 @@ default List getUnitConfigsByConnectionIdAndServiceType(final String * connection id. * * @param connectionConfigId - * * @return the list of service configurations. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException is thrown if the given connection config id * is unknown. @@ -1940,9 +1818,7 @@ default List getServiceConfigsByConnection(final String connectio * connection id. * * @param connectionConfigId - * * @return the list of service configurations. - * * @throws CouldNotPerformException is thrown if the request fails. * @throws NotAvailableException is thrown if the given connection config id * is unknown. @@ -1960,9 +1836,7 @@ default List getServiceConfigsByConnectionId(final String connect * does not belong to a tile, the could not perform exception is thrown. * * @param locationId the id of the location which neighbors you want to get - * * @return all neighbor tiles - * * @throws CouldNotPerformException is thrown if the request fails. * @deprecated since 2.0 and will be removed in 3.0: please use getNeighborLocationsByLocationId(...) instead. */ @@ -1976,9 +1850,7 @@ default List getNeighborLocations(final String locationId) throws Co * does not belong to a tile, the could not perform exception is thrown. * * @param locationId the id of the location which neighbors you want to get - * * @return all neighbor tiles - * * @throws CouldNotPerformException is thrown if the request fails. */ default List getNeighborLocationsByLocationId(final String locationId) throws CouldNotPerformException { @@ -2007,9 +1879,7 @@ default List getNeighborLocationsByLocationId(final String locationI * Method returns all agent unit configs which are based on the given agent class. * * @param agentClass the agent class to identify the units. - * * @return a list of matching agent configs. - * * @throws CouldNotPerformException is thrown in case the list could not be generated. */ default List getAgentUnitConfigsByAgentClass(final AgentClass agentClass) throws CouldNotPerformException { @@ -2020,9 +1890,7 @@ default List getAgentUnitConfigsByAgentClass(final AgentClass agentC * Method returns all agent unit configs which are based on the given agent class. * * @param agentClassId the if of the agent class to identify the units. - * * @return a list of matching agent configs. - * * @throws CouldNotPerformException is thrown in case the list could not be generated. */ default List getAgentUnitConfigsByAgentClassId(final String agentClassId) throws CouldNotPerformException { @@ -2043,9 +1911,7 @@ default List getAgentUnitConfigsByAgentClassId(final String agentCla * Method returns all app unit configs which are based on the given app class. * * @param appClass the app class to identify the units. - * * @return a list of matching app configs. - * * @throws CouldNotPerformException is thrown in case the list could not be generated. */ default List getAppUnitConfigsByAppClass(final AppClass appClass) throws CouldNotPerformException, InterruptedException { @@ -2056,9 +1922,7 @@ default List getAppUnitConfigsByAppClass(final AppClass appClass) th * Method returns all app unit configs which are based on the given app class. * * @param appClassId the if of the app class to identify the units. - * * @return a list of matching app configs. - * * @throws CouldNotPerformException is thrown in case the list could not be generated. */ default List getAppUnitConfigsByAppClassId(final String appClassId) throws CouldNotPerformException, InterruptedException { @@ -2086,7 +1950,6 @@ default List getAppUnitConfigsByAppClassId(final String appClassId) * Else the token cannot be verified and encrypted which means everybody listening could use it. * * @param authorizationToken the authorizationToken which is verified an encrypted - * * @return a future of a task that verifies and encrypts the token */ Future requestAuthorizationToken(final AuthorizationToken authorizationToken); @@ -2102,7 +1965,6 @@ default List getAppUnitConfigsByAppClassId(final String appClassId) * * @param authenticatedValue The authenticated value for the request containing a valid ticket and an authorizationToken encrypted * with the session key. - * * @return The future of a task that creates an authenticated value containing an updated ticket and the token encoded via Base64 * and encrypted with the session key. */ diff --git a/module/registry/unit-registry/remote/src/main/java/org/openbase/bco/registry/unit/remote/UnitRegistryRemote.java b/module/registry/unit-registry/remote/src/main/java/org/openbase/bco/registry/unit/remote/UnitRegistryRemote.java index 0e919ce69e..773ba83456 100644 --- a/module/registry/unit-registry/remote/src/main/java/org/openbase/bco/registry/unit/remote/UnitRegistryRemote.java +++ b/module/registry/unit-registry/remote/src/main/java/org/openbase/bco/registry/unit/remote/UnitRegistryRemote.java @@ -10,12 +10,12 @@ * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Lesser Public License for more details. - * + * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * . @@ -34,8 +34,10 @@ import org.openbase.jps.core.JPService; import org.openbase.jps.preset.JPReadOnly; import org.openbase.jul.communication.controller.RPCUtils; -import org.openbase.jul.exception.*; +import org.openbase.jul.exception.CouldNotPerformException; import org.openbase.jul.exception.InstantiationException; +import org.openbase.jul.exception.InvalidStateException; +import org.openbase.jul.exception.NotAvailableException; import org.openbase.jul.extension.protobuf.IdentifiableMessage; import org.openbase.jul.extension.type.processing.LabelProcessor; import org.openbase.jul.extension.type.util.TransactionSynchronizationFuture; @@ -153,12 +155,16 @@ public void waitForData() throws CouldNotPerformException, InterruptedException @Override public void activate() throws InterruptedException, CouldNotPerformException { unitConfigRemoteRegistry.addDataObserver(aliasMapUpdateObserver); + unitConfigRemoteRegistry.addDataObserver(clearUnitConfigsByTypeObserver); + CachedUnitRegistryRemote.getRegistry().addDataObserver(clearUnitConfigsByTypeObserver); super.activate(); } @Override public void deactivate() throws InterruptedException, CouldNotPerformException { unitConfigRemoteRegistry.removeDataObserver(aliasMapUpdateObserver); + unitConfigRemoteRegistry.removeDataObserver(clearUnitConfigsByTypeObserver); + CachedUnitRegistryRemote.getRegistry().removeDataObserver(clearUnitConfigsByTypeObserver); super.deactivate(); } @@ -334,7 +340,6 @@ public RemoteRegistry getBaseUnitConfigR * {@inheritDoc} * * @param unitConfig {@inheritDoc} - * * @return {@inheritDoc} */ @Override @@ -351,9 +356,7 @@ public Future registerUnitConfigAuthenticated(AuthenticatedV * {@inheritDoc} * * @param unitConfigId {@inheritDoc} - * * @return {@inheritDoc} - * * @throws org.openbase.jul.exception.NotAvailableException {@inheritDoc} */ @Override @@ -370,9 +373,7 @@ public UnitConfig getUnitConfigById(final String unitConfigId) throws NotAvailab * {@inheritDoc} * * @param unitAlias {@inheritDoc} - * * @return {@inheritDoc} - * * @throws NotAvailableException {@inheritDoc} */ @Override @@ -394,9 +395,7 @@ public UnitConfig getUnitConfigByAlias(final String unitAlias) throws NotAvailab * * @param unitAlias {@inheritDoc} * @param unitType {@inheritDoc} - * * @return {@inheritDoc} - * * @throws NotAvailableException {@inheritDoc} */ @Override @@ -457,9 +456,7 @@ public Future removeUnitConfigAuthenticated(final Authentica * {@inheritDoc} * * @param filterDisabledUnits {@inheritDoc} - * * @return {@inheritDoc} - * * @throws CouldNotPerformException {@inheritDoc} * @throws NotAvailableException {@inheritDoc} */ @@ -481,7 +478,6 @@ public List getUnitConfigsFiltered(boolean filterDisabledUnits) thro * {@inheritDoc} * * @return {@inheritDoc} - * * @throws CouldNotPerformException {@inheritDoc} */ @Override @@ -502,7 +498,6 @@ public List getDalUnitConfigs() throws CouldNotPerformException { * {@inheritDoc} * * @return {@inheritDoc} - * * @throws CouldNotPerformException {@inheritDoc} */ @Override @@ -878,7 +873,6 @@ public Boolean isGatewayUnitRegistryConsistent() { * {@inheritDoc} * * @param authorizationToken {@inheritDoc} - * * @return {@inheritDoc} */ @Override @@ -895,7 +889,6 @@ public Future requestAuthorizationToken(final AuthorizationToken authori * {@inheritDoc} * * @param authenticatedValue {@inheritDoc} - * * @return {@inheritDoc} */ @Override