|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.adobe.idp.dsc.registry.service.client.ServiceRegistryClient
public class ServiceRegistryClient
The client implementation of the Service Registry. It provides clients the ability to query the metadata and state of a service, deploy and undeploy services, and toggle the state of a service from RUNNING to STOPPED.
Field Summary |
---|
Fields inherited from interface com.adobe.idp.dsc.registry.service.ServiceRegistry |
---|
DEFAULT_CATEGORY_ID, SERVICE_ID |
Constructor Summary | |
---|---|
ServiceRegistryClient(ServiceClientFactory clientServiceFactory)
The constructor for creating a Service Registry client instance. |
|
ServiceRegistryClient(ServiceClientFactory clientServiceFactory,
boolean verifyCache)
The constructor for creating a Service Registry client instance. |
Method Summary | |
---|---|
void |
clearCache()
Clears any caching of services. |
ServiceConfiguration |
createAndDeploy(Component aComponent,
java.lang.String aServiceId,
int aMajorVersion,
int aMinorVersion,
java.lang.String aDescriptor,
java.util.Map aConfigParameters)
Creates and deploys a new service, leaving it in a STOPPED state. |
ServiceConfiguration |
createAndDeploy(Component aComponent,
java.lang.String aCategoryId,
java.lang.String aServiceId,
int aMajorVersion,
int aMinorVersion,
java.lang.String aType,
java.lang.String aDescriptor,
java.util.Map aConfigParamsAsStrings)
Creates and deploys a new service configuration, leaving it in a STOPPED state. |
ServiceConfiguration |
createAndDeploy(CreateServiceConfigurationInfo aInfo,
java.util.Map aConfigParamsAsStrings)
Creates and deploys a new service configuration, leaving it in a STOPPED state. |
ServiceConfiguration |
createAndDeploy(CreateServiceConfigurationInfo aInfo,
java.util.Map aConfigValuesAsStrings,
boolean aOverrideEndpointCreation)
Creates and deploys a new service configuration, leaving it in a STOPPED state. |
ServiceCategory |
createCategory(CreateServiceCategoryInfo aCat)
Creates a service category with the specified category information. |
ServiceConfiguration |
createConfiguration(CreateServiceConfigurationInfo aInfo)
Creates a service configuration with the specified configuration information values. |
Service |
createService(CreateServiceInfo aInfo)
Creates a new Service object
with the values specified in the CreateServiceInfo object. |
ServiceConfiguration |
deploy(ServiceConfiguration aConfig)
Transitions an Inactive service configuration into an Active, but STOPPED state. |
void |
forceRemovalOfConfiguration(ServiceConfiguration aConfig)
Forces the removal of the specified service configuration. |
ServiceConfiguration |
forceUndeploy(ServiceConfiguration aServiceConfig)
Forces the undeploy of a service (ignoring exceptions for callback methods), transitioning it to an Inactive state. |
java.lang.ClassLoader |
getClientClassLoader(java.lang.ClassLoader aParent,
ServiceConfiguration aConfig)
Retrieves the client class loader, which can be used to load the necessary types needed to invoke a service's operations. |
java.util.Map |
getClientLibAsMap(java.lang.String aServiceId,
int aMajorVersion,
int aMinorVersion)
This method returns a java.util.Map of classes and resources needed by clients to interact with
this service. |
ServiceConfiguration |
getCompatibleServiceConfiguration(java.lang.String aServiceId,
int aMajorVersion,
int aMinorVersion)
Retrieves a service with the specified service identifier that is compatible with the specified version. |
ServiceConfiguration |
getHeadActiveConfiguration(java.lang.String aServiceId)
Retrieves a service with the specified service identifier. |
ServiceConfiguration |
getHeadServiceConfiguration(java.lang.String aServiceId)
Retrieves a service with the specified service identifier. |
Service |
getService(java.lang.String aServiceId)
Retrieves the specified service. |
java.util.List |
getServiceCategories()
Retrieves all of the service categories in the container. |
com.adobe.idp.dsc.filter.FilterResult |
getServiceCategories(com.adobe.idp.dsc.filter.PagingFilter aFilter)
Retrieves all the service configurations within the container with the specified paging criteria. |
ServiceCategory |
getServiceCategory(java.lang.String aId)
Retrieves the specified service category. |
ServiceConfiguration |
getServiceConfiguration(java.lang.String aServiceId,
int aMajorVersion,
int aMinorVersion)
Retrieves a single service configuration with the specified service identifier and version information. |
java.util.List |
getServiceConfigurations()
Retrieves a list of all the services within the container. |
java.util.List |
getServiceConfigurations(Component aComponent)
Retrieves a list of all the service configurations within the container that are deployed against the specified component. |
com.adobe.idp.dsc.filter.FilterResult |
getServiceConfigurations(com.adobe.idp.dsc.filter.PagingFilter aFilter)
Retrieves a list of all the service configurations, within the container, having the specified paging criteria. |
java.util.List |
getServiceConfigurations(Service aService)
Retrieves a list of all the service configurations within the container that are created for the specified service. |
java.util.List |
getServiceConfigurationsForSpecificationId(java.lang.String aSpecificationId)
Retrieves a list of all the service configurations within the container that implement the specification identifier. |
java.util.List |
getServices()
Retrieves all the services. |
java.util.List |
getServices(ServiceCategory aCategory)
Retrieves the services belonging to the specified category. |
ServiceConfiguration |
lock(ServiceConfiguration aConfig)
Locks a service configuration so that it can only be modified by the "LockedByUser" . |
ServiceCategory |
modifyCategory(ModifyServiceCategoryInfo aInfo)
Modifies a service category by applying the specified properties. |
ServiceConfiguration |
modifyConfiguration(ModifyServiceConfigurationInfo aInfo)
Modifies the specified service configuration with the properties that have been set in the ModifyServiceConfigurationInfo object. |
Service |
modifyService(ModifyServiceInfo aService)
Modifies the specified Service object with
the values specified in the ModifyServiceInfo object. |
void |
removeCategory(ServiceCategory aCat)
Removes the specified service category. |
void |
removeConfiguration(ServiceConfiguration aConfig)
Removes the specified service configuration. |
void |
removeService(Service aService)
Removes the specified service. |
ServiceConfiguration |
start(ServiceConfiguration aService)
Starts the specified document service, transitioning the state of the service from STOPPED to RUNNING. |
ServiceConfiguration |
stop(ServiceConfiguration aService)
Stops the specified document service, tansitioning the state of the service from RUNNING to STOPPED. |
ServiceConfiguration |
undeploy(ServiceConfiguration aServiceConfig)
Undeploys a service, transitioning it to an Inactive state. |
ServiceConfiguration |
unlock(ServiceConfiguration aConfig)
Releases the lock held by the "LockedByUser" . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ServiceRegistryClient(ServiceClientFactory clientServiceFactory)
clientServiceFactory
- A ServiceClientFactory instance with valid credentials of the server
where the service is deployed.public ServiceRegistryClient(ServiceClientFactory clientServiceFactory, boolean verifyCache)
clientServiceFactory
- A ServiceClientFactory instance with valid credentials of the server
where the service is deployed.verifyCache
- a boolean that when set to true will reverify the validity of cached ClassLoader
instances returned from getClientClassLoader method. Verification is performed by comparing the
ServiceConfiguration's last update time. A value of false will cause the first Classloader for the
service to be recycled, it is necessary to retrieve a new ServiceRegistryClient instance in order to
access the updated Classloader.Method Detail |
---|
public Service createService(CreateServiceInfo aInfo) throws RegistryException
Service
object
with the values specified in the CreateServiceInfo
object.
createService
in interface ServiceRegistry
aInfo
- Values to be applied to the new Service
object.
Service
object containing the specified information.
RegistryException
public Service getService(java.lang.String aServiceId) throws RegistryException
getService
in interface ServiceRegistry
aServiceId
- The service identifier.
RegistryException
public java.util.List getServices(ServiceCategory aCategory)
getServices
in interface ServiceRegistry
aCategory
- The service category.
public java.util.List getServices()
getServices
in interface ServiceRegistry
public Service modifyService(ModifyServiceInfo aService) throws RegistryException
Service
object with
the values specified in the ModifyServiceInfo
object.
modifyService
in interface ServiceRegistry
aService
- Property values to be applied to the specified Service
object.
RegistryException
public void removeService(Service aService) throws RegistryException
removeService
in interface ServiceRegistry
aService
- The service to remove.
RegistryException
public ServiceConfiguration createConfiguration(CreateServiceConfigurationInfo aInfo) throws RegistryException
createConfiguration
in interface ServiceRegistry
aInfo
- The configuration information values.
RegistryException
public void removeConfiguration(ServiceConfiguration aConfig) throws RegistryException
removeConfiguration
in interface ServiceRegistry
aConfig
- The service configuration to be removed.
RegistryException
public void forceRemovalOfConfiguration(ServiceConfiguration aConfig) throws RegistryException
forceRemovalOfConfiguration
in interface ServiceRegistry
aConfig
- The service configuration to be removed.
RegistryException
public ServiceCategory createCategory(CreateServiceCategoryInfo aCat) throws RegistryException
createCategory
in interface ServiceRegistry
aCat
- The category information.
RegistryException
public ServiceCategory getServiceCategory(java.lang.String aId) throws RegistryException
getServiceCategory
in interface ServiceRegistry
aId
- The category identifier.
RegistryException
public ServiceCategory modifyCategory(ModifyServiceCategoryInfo aInfo) throws RegistryException
modifyCategory
in interface ServiceRegistry
aInfo
- Values to be applied to the service category.
RegistryException
public void removeCategory(ServiceCategory aCat) throws RegistryException
removeCategory
in interface ServiceRegistry
aCat
- The service category to be removed.
RegistryException
public java.util.List getServiceCategories()
getServiceCategories
in interface ServiceRegistry
public java.util.List getServiceConfigurations()
getServiceConfigurations
in interface ServiceRegistry
public java.util.List getServiceConfigurationsForSpecificationId(java.lang.String aSpecificationId)
getServiceConfigurationsForSpecificationId
in interface ServiceRegistry
aSpecificationId
- The specification identifier.
public com.adobe.idp.dsc.filter.FilterResult getServiceConfigurations(com.adobe.idp.dsc.filter.PagingFilter aFilter)
getServiceConfigurations
in interface ServiceRegistry
aFilter
- The paging criteria.
public com.adobe.idp.dsc.filter.FilterResult getServiceCategories(com.adobe.idp.dsc.filter.PagingFilter aFilter)
getServiceCategories
in interface ServiceRegistry
aFilter
- The paging criteria.
public java.util.List getServiceConfigurations(Component aComponent)
getServiceConfigurations
in interface ServiceRegistry
aComponent
- The component for which to list its related services.
public java.util.List getServiceConfigurations(Service aService)
getServiceConfigurations
in interface ServiceRegistry
aService
- The component for which to list its related services.
public ServiceConfiguration getHeadServiceConfiguration(java.lang.String aServiceId) throws RegistryException
getHeadServiceConfiguration
in interface ServiceRegistry
aServiceId
- The name of the service.
RegistryException
public ServiceConfiguration getHeadActiveConfiguration(java.lang.String aServiceId) throws RegistryException
getHeadActiveConfiguration
in interface ServiceRegistry
aServiceId
- The name of the service to be returned.
RegistryException
public ServiceConfiguration getCompatibleServiceConfiguration(java.lang.String aServiceId, int aMajorVersion, int aMinorVersion) throws RegistryException
getCompatibleServiceConfiguration
in interface ServiceRegistry
aServiceId
- The name of the service.aMajorVersion
- The major version.aMinorVersion
- The minor version.
ServiceNotFoundException
RegistryException
public ServiceConfiguration getServiceConfiguration(java.lang.String aServiceId, int aMajorVersion, int aMinorVersion) throws RegistryException
getServiceConfiguration
in interface ServiceRegistry
aServiceId
- The name of the service.aMajorVersion
- The major version.aMinorVersion
- The minor version.
ServiceConfigurationNotFoundException
RegistryException
public ServiceConfiguration start(ServiceConfiguration aService) throws RegistryException
start
in interface ServiceRegistry
aService
- The service to be started.
RegistryException
public ServiceConfiguration stop(ServiceConfiguration aService) throws RegistryException
stop
in interface ServiceRegistry
aService
- The service to be stopped.
RegistryException
public ServiceConfiguration createAndDeploy(Component aComponent, java.lang.String aServiceId, int aMajorVersion, int aMinorVersion, java.lang.String aDescriptor, java.util.Map aConfigParameters) throws RegistryException
createAndDeploy
in interface ServiceRegistry
aComponent
- The component against which the service is being deployed.aServiceId
- The identifier of the service that clients will use to look up and invoke.aMajorVersion
- The major version number of the service.aMinorVersion
- The minor version number of the service.aDescriptor
- The physical descriptor to be processed by the component.
In the case of a POJO this is expected to be the service element; however, in
the case of an orchestrated service this would be the process template.aConfigParameters
- Configuration parameters, gathered through the deployment tool, that
will be stored in the service registry. These values are expected to be the serialized output
of a Property Editor.
RegistryException
public ServiceConfiguration createAndDeploy(Component aComponent, java.lang.String aCategoryId, java.lang.String aServiceId, int aMajorVersion, int aMinorVersion, java.lang.String aType, java.lang.String aDescriptor, java.util.Map aConfigParamsAsStrings) throws RegistryException
createAndDeploy
in interface ServiceRegistry
aComponent
- The component against which the service is being deployed.aCategoryId
- The identifier of the category under which the service will be deployed.aServiceId
- The identifier of the service that clients will use to look up and invoke.aMajorVersion
- The major version number of the service.aMinorVersion
- The minor version number of the service.aType
- The type of the service configuration.aDescriptor
- The physical descriptor to be processed by the Component.
In the case of a POJO this is expected to be the service element; however, in
the case of an orchestrated service this would be the process template.aConfigParamsAsStrings
- Configuration parameters, gathered through the deployment tool, that
will be stored in the service registry. These values are expected to be the serialized output
of a Property Editor.
RegistryException
public ServiceConfiguration createAndDeploy(CreateServiceConfigurationInfo aInfo, java.util.Map aConfigParamsAsStrings) throws RegistryException
createAndDeploy
in interface ServiceRegistry
aInfo
- An object containing the values used to create and deploy a service configuration.aConfigParamsAsStrings
- Configuration parameters, gathered through the deployment tool, which
will be stored in the Service Registry. These values are expected to be the serialized output
of a Property Editor.
RegistryException
public ServiceConfiguration createAndDeploy(CreateServiceConfigurationInfo aInfo, java.util.Map aConfigValuesAsStrings, boolean aOverrideEndpointCreation) throws RegistryException
ServiceRegistry
createAndDeploy
in interface ServiceRegistry
aInfo
- An object containing the values used to create and deploy a service configuration.aConfigValuesAsStrings
- Configuration parameters, gathered through the deployment tool, which
will be stored in the Service Registry. These values are expected to be the serialized output
of a Property Editor.aOverrideEndpointCreation
- specify whether to override the creation of default endpoints, by default endpoints
are always created, passing true will override this creation
RegistryException
public ServiceConfiguration deploy(ServiceConfiguration aConfig) throws RegistryException
deploy
in interface ServiceRegistry
aConfig
- The service configuration to be transitioned.
RegistryException
public ServiceConfiguration modifyConfiguration(ModifyServiceConfigurationInfo aInfo) throws RegistryException
ModifyServiceConfigurationInfo
object.
modifyConfiguration
in interface ServiceRegistry
aInfo
- Contains property values to be set in the specified service configuration.
RegistryException
public ServiceConfiguration undeploy(ServiceConfiguration aServiceConfig) throws RegistryException
undeploy
in interface ServiceRegistry
aServiceConfig
- The service to be undeployed.
RegistryException
public ServiceConfiguration forceUndeploy(ServiceConfiguration aServiceConfig) throws RegistryException
forceUndeploy
in interface ServiceRegistry
aServiceConfig
- The service to be undeployed.
RegistryException
public void clearCache()
clearCache
in interface ServiceRegistry
public java.util.Map getClientLibAsMap(java.lang.String aServiceId, int aMajorVersion, int aMinorVersion) throws RegistryException
java.util.Map
of classes and resources needed by clients to interact with
this service. The classes and resources returned are determined by the
export specifications in the related component's component.xml.
getClientLibAsMap
in interface ServiceRegistry
aServiceId
- The service identifier.aMajorVersion
- The major version.aMinorVersion
- The minor version.
java.util.Map
of classes and resources needed by clients to interact with
this service.
RegistryException
public java.lang.ClassLoader getClientClassLoader(java.lang.ClassLoader aParent, ServiceConfiguration aConfig) throws RegistryException
aParent
- The parent class loader.aConfig
- The service.
RegistryException
public ServiceConfiguration lock(ServiceConfiguration aConfig) throws RegistryException
"LockedByUser"
.
lock
in interface ServiceRegistry
aConfig
- The service configuration to be locked.
RegistryException
public ServiceConfiguration unlock(ServiceConfiguration aConfig) throws RegistryException
"LockedByUser"
.
unlock
in interface ServiceRegistry
aConfig
- The service configuration to be unlocked.
RegistryException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |