public interface ServiceFactory
ServiceFactory is the central point to retrieve CARNOT services. Based
on the CARNOT configuration it shields several aspects from the programmer:
ServiceFactory is configured to use per thread caching of
services.
A typical usage pattern of using a ServiceFactory is
ServiceFactory sf = ServiceFactoryLocator.get("user", "password");
WorkflowService ws = sf.getWorkflowService();
// use service methods
QueryService qs = sf.getQueryService();
// use service methods
// release all services and related resources
sf.close();
ServiceFactoryLocator,
WorkflowService,
AdministrationService,
UserService,
QueryService,
DocumentManagementService| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases all resources hold by the service factory and its single services.
|
AdministrationService |
getAdministrationService()
Returns an AdministrationService.
|
DocumentManagementService |
getDocumentManagementService()
Returns a document management service.
|
QueryService |
getQueryService()
Returns a QueryService.
|
<T extends org.eclipse.stardust.engine.api.runtime.Service> |
getService(Class<T> type)
Retrieves a service instance.
|
String |
getSessionId()
Gets the user session id
|
UserService |
getUserService()
Returns a UserService.
|
WorkflowService |
getWorkflowService()
Returns a WorkflowService.
|
void |
release(org.eclipse.stardust.engine.api.runtime.Service service)
Provides explicit service resource management.
|
void |
setCredentials(Map credentials) |
void |
setProperties(Map properties) |
<T extends org.eclipse.stardust.engine.api.runtime.Service> T getService(Class<T> type) throws ServiceNotAvailableException, org.eclipse.stardust.common.error.LoginFailedException
type - The class name of the service to be retrieved.ServiceNotAvailableException - In case the (possible remote) service could not
be reached.org.eclipse.stardust.common.error.LoginFailedException - In case the authentication to the service fails.WorkflowService getWorkflowService() throws ServiceNotAvailableException, org.eclipse.stardust.common.error.LoginFailedException
ServiceNotAvailableException - In case the (possible remote) service could not
be reached.org.eclipse.stardust.common.error.LoginFailedException - In case the authentication to the service fails.UserService getUserService() throws ServiceNotAvailableException, org.eclipse.stardust.common.error.LoginFailedException
ServiceNotAvailableException - In case the (possible remote) service could not
be reached.org.eclipse.stardust.common.error.LoginFailedException - In case the authentication to the service fails.AdministrationService getAdministrationService() throws ServiceNotAvailableException, org.eclipse.stardust.common.error.LoginFailedException
ServiceNotAvailableException - In case the (possible remote) service could not
be reached.org.eclipse.stardust.common.error.LoginFailedException - In case the authentication to the service fails.QueryService getQueryService() throws ServiceNotAvailableException, org.eclipse.stardust.common.error.LoginFailedException
ServiceNotAvailableException - In case the (possible remote) service could not
be reached.org.eclipse.stardust.common.error.LoginFailedException - In case the authentication to the service fails.DocumentManagementService getDocumentManagementService() throws ServiceNotAvailableException, org.eclipse.stardust.common.error.LoginFailedException
ServiceNotAvailableException - In case the (possible remote) service could not
be reached.org.eclipse.stardust.common.error.LoginFailedException - In case the authentication to the service fails.void release(org.eclipse.stardust.engine.api.runtime.Service service)
ServiceFactory provides automatic resource cleanup.service - The service to be released.close()void close()
void setCredentials(Map credentials)
void setProperties(Map properties)
String getSessionId()
Copyright © 2016 Eclipse Stardust. All Rights Reserved.