add documentation for replicable service

This commit is contained in:
Fredrik Teschke
2015-01-29 16:58:53 +01:00
parent 02972d1bea
commit 1272b9a314
2 changed files with 7 additions and 1 deletions
@@ -0,0 +1,35 @@
package com.sap.sse.filestorage.common;
import com.sap.sse.common.NoCorrespondingServiceRegisteredException;
/**
* OSGi service for managing {@link FileStorageService FileStorageServices}.
*
* @author Fredrik Teschke
*
*/
public interface FileStorageManagementService {
FileStorageService[] getAvailableFileStorageServices();
FileStorageService getFileStorageService(String name);
/**
* Sets the property of the service, and also stores the property value so that it can be restored after a server
* restart.
*
* @throws NoCorrespondingServiceRegisteredException
* service may have disappeared from registry in the meantime
* @throws IllegalArgumentException
* if the property with name {@code propertyName} doesn't exist for the service
*/
void setFileStorageServiceProperty(String serviceName, String propertyName, String propertyValue)
throws NoCorrespondingServiceRegisteredException, IllegalArgumentException;
/**
* @throws NoCorrespondingServiceRegisteredException
* if no service has been selected so far.
*/
FileStorageService getActiveFileStorageService() throws NoCorrespondingServiceRegisteredException;
void setActiveFileStorageService(FileStorageService service);
}
@@ -1,15 +1,21 @@
package com.sap.sse.filestorage.impl;
import com.sap.sse.common.NoCorrespondingServiceRegisteredException;
import com.sap.sse.filestorage.FileStorageManagementService;
import com.sap.sse.filestorage.common.FileStorageService;
/**
* Defines internal operations that do are called only by
* Publishes those methods of {@link FileStorageManagementService} that are required by operations implemented as lambda
* expressions to fulfill their tasks. These operations should not be invoked by external service clients.
* {@link FileStorageManagementService} is the one registered with the OSGi registry and thus the publicly-visible
* interface (description copied from ReplicableSecurityService).
*
* @author Fredrik Teschke
*
*/
public interface ReplicableFileStorageManagementService {
void internalSetFileStorageServiceProperty(String serviceName, String propertyName, String propertyValue)
throws NoCorrespondingServiceRegisteredException, IllegalArgumentException;
void internalSetActiveFileStorageService(FileStorageService service);
}