public class ServiceConfigurationFactory
extends com.streamscape.sef.dispatcher.AbstractRuntimeFactory
Title: Service Event Fabric Runtime
Description: A factory for working with Service Configuration Objects
.
This factory allows users to perform all critical operations pertaining to a Service Configuration Object
.
This factory will not function without a properly initialized RuntimeContext
. Specifically the
factory allows users to create default or empty configuration object so that they may be programmatically populated, and
to load or save such configuration objects using the persistence mechanism that is configured with the Runtime Context
.
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROTOTYPE |
DEFAULT_SERIAL_VERSION_ID
Constructor and Description |
---|
ServiceConfigurationFactory(com.streamscape.repository.RepositoryContext repositoryContext) |
Modifier and Type | Method and Description |
---|---|
static ServiceConfigurationObject |
createDefaultServiceConfiguration(FabricComponent component,
java.lang.String serviceTypeName)
The constructor that allows for creation of a default (factory)
Service Configuration Object . |
static ServiceConfigurationObject |
createServiceConfiguration(FabricComponent component,
java.lang.String serviceName,
java.lang.String serviceTypeName,
boolean isTransient)
A convenience constructor that creates a
Service Configuration Object of a specific type. |
static boolean |
existsConfigurationObject(java.lang.String serviceName,
java.lang.String serviceType) |
static boolean |
existsServiceInstances(java.lang.String serviceType) |
static boolean |
existsServicePrototype(java.lang.String serviceType) |
static ServiceConfigurationObject |
loadConfigurationObject(FabricComponent component,
java.lang.String serviceName,
java.lang.String serviceType,
boolean isTransient)
Loads
Service Configuration Object from a repository, a runtime cache
or combination of sources based on the persistence mode. |
static ServiceConfigurationObject |
loadConfigurationObject(FabricComponent component,
java.lang.String workingDir,
java.lang.String serviceName,
java.lang.String serviceType,
boolean isTransient)
Loads a service configuration instance from a file at the location supplied by the
workingDir parameter. |
static void |
removeConfigurationObject(java.lang.String serviceName,
java.lang.String serviceType)
Remove a service configuration from the backing persistence store.
|
static void |
saveConfigurationObject(ServiceConfigurationObject sco)
Saves a configuration object to a repository specified by the
Repository Context . |
static void |
saveConfigurationObject(java.lang.String workingDir,
ServiceConfigurationObject sco)
Saves a configuration object to a file at the location specified by the
workingDir
parameter. |
getContextType, hasContext
clone, getSerialVersionUID
public static final java.lang.String PROTOTYPE
public ServiceConfigurationFactory(com.streamscape.repository.RepositoryContext repositoryContext)
public static ServiceConfigurationObject createDefaultServiceConfiguration(FabricComponent component, java.lang.String serviceTypeName) throws ServiceConfigurationException
Service Configuration Object
.ServiceConfigurationException
public static ServiceConfigurationObject createServiceConfiguration(FabricComponent component, java.lang.String serviceName, java.lang.String serviceTypeName, boolean isTransient) throws ServiceConfigurationException
Service Configuration Object
of a specific type.serviceName
- StringserviceTypeName
- StringisTransient
- booleanServiceConfigurationException
ServiceConfigurationException
public static void saveConfigurationObject(ServiceConfigurationObject sco) throws ServiceConfigurationException
Repository Context
.sco
- ServiceConfigurationObject The service configuratin object instance.ServiceConfigurationException
ServiceConfigurationException
public static void saveConfigurationObject(java.lang.String workingDir, ServiceConfigurationObject sco) throws ServiceConfigurationException
workingDir
parameter. The save operations locks the resource file for write. On platforms where this
behavior is strictly enforced this operation may fail if the file is already locked by
another application outside the JVM.workingDir
- String The directory where the file is to be written to.sco
- ServiceConfigurationObjectServiceConfigurationException
ServiceConfigurationException
public static ServiceConfigurationObject loadConfigurationObject(FabricComponent component, java.lang.String serviceName, java.lang.String serviceType, boolean isTransient) throws ServiceConfigurationException
Service Configuration Object
from a repository, a runtime cache
or combination of sources based on the persistence mode.component
- FabricComponentserviceName
- StringserviceType
- StringisTransient
- booleanServiceConfigurationException
ServiceConfigurationException
public static boolean existsConfigurationObject(java.lang.String serviceName, java.lang.String serviceType) throws ServiceConfigurationException
ServiceConfigurationException
public static boolean existsServicePrototype(java.lang.String serviceType) throws ServiceConfigurationException
ServiceConfigurationException
public static boolean existsServiceInstances(java.lang.String serviceType) throws ServiceConfigurationException
ServiceConfigurationException
public static ServiceConfigurationObject loadConfigurationObject(FabricComponent component, java.lang.String workingDir, java.lang.String serviceName, java.lang.String serviceType, boolean isTransient) throws ServiceConfigurationException
workingDir
parameter.workingDir
- String The location where to load the file from.serviceName
- String Name of service.serviceType
- String Type of service.isTransient
- booleanServiceConfigurationException
ServiceConfigurationException
public static void removeConfigurationObject(java.lang.String serviceName, java.lang.String serviceType) throws ServiceConfigurationException
serviceName
- StringserviceType
- StringServiceConfigurationException
ServiceConfigurationException
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.