public class CompositeService extends AbstractService
DEBUG| Constructor and Description |
|---|
CompositeService(java.lang.String serviceName,
java.lang.String serviceEndpoint,
java.lang.String workflow)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addQosRequirement(java.lang.String requirementName,
AbstractQoSRequirement qosRequirement)
Add QoS requirement
|
boolean |
containServices(java.lang.String serviceType,
java.lang.String opName)
Returns true if composite service cache contains instances of the specific service type with operation name
|
SDCache |
getCache()
Return the cache
|
CostProbe |
getCostProbe()
Returns the cost probe
|
java.util.List<java.lang.String> |
getQosRequirementNames()
Returns list of QoS names added in to the composite service
|
java.util.Map<java.lang.String,AbstractQoSRequirement> |
getQosRequirements()
Return QoS requirements
|
ServiceDescription |
getServiceDescription(int registerId)
Get service description using register ID of the service from cache
|
WorkflowProbe |
getWorkflowProbe()
Return the workflow probe
|
java.lang.Object |
invokeCompositeService(java.lang.String qosRequirement,
java.lang.Object[] params)
Invoke this composite service to start a workflow with specific QoS requirements
and initial parameters for the workflow
|
java.lang.Object |
invokeLocalOperation(java.lang.String opName,
java.lang.Object[] params)
Invoke the operation without the annotation "ServiceOperation"
|
java.lang.Object |
invokeOperation(java.lang.String opName,
Param[] params)
Invoke service operation
|
java.lang.Object |
invokeServiceOperation(java.lang.String qosRequirement,
java.lang.String serviceName,
java.lang.String opName,
java.lang.Object[] params)
Invoke a service operation
|
java.util.List<ServiceDescription> |
lookupService(java.lang.String serviceType,
java.lang.String opName)
Search through service registry to get the list of service descriptions
|
void |
setWorkflow(java.lang.String workflow)
Set the workflow
|
void |
stopRetrying()
If a service failed and composite service is retrying, this method will effect to stop retrying for that service.
|
getConfiguration, getServiceDescription, onMessage, register, sendRequest, sendRequest, setServiceDescription, startService, stopService, unRegister, updateServiceDescriptionpublic CompositeService(java.lang.String serviceName,
java.lang.String serviceEndpoint,
java.lang.String workflow)
serviceName - the service nameserviceEndpoint - the service endpointworkflow - the workflowpublic void setWorkflow(java.lang.String workflow)
workflow - the new workflowpublic SDCache getCache()
public void addQosRequirement(java.lang.String requirementName,
AbstractQoSRequirement qosRequirement)
requirementName - the QoS requirement nameqosRequirement - the QoS requirement Objectpublic java.util.Map<java.lang.String,AbstractQoSRequirement> getQosRequirements()
public java.util.List<java.lang.String> getQosRequirementNames()
public java.lang.Object invokeCompositeService(java.lang.String qosRequirement,
java.lang.Object[] params)
qosRequirement - the QoS requirement name for executing the workflowparams - the initial parameters for the workflowpublic java.lang.Object invokeOperation(java.lang.String opName,
Param[] params)
AbstractServiceinvokeOperation in class AbstractServiceopName - the operation nameparams - arguments of the operationpublic java.util.List<ServiceDescription> lookupService(java.lang.String serviceType, java.lang.String opName)
serviceType - the service typeopName - the operation namepublic CostProbe getCostProbe()
public WorkflowProbe getWorkflowProbe()
public boolean containServices(java.lang.String serviceType,
java.lang.String opName)
serviceType - the service typeopName - the operation namepublic ServiceDescription getServiceDescription(int registerId)
registerId - the register idpublic java.lang.Object invokeServiceOperation(java.lang.String qosRequirement,
java.lang.String serviceName,
java.lang.String opName,
java.lang.Object[] params)
qosRequirement - the applied QoS requirementsserviceName - the service nameopName - the operation nameparams - the parameters of the operationpublic java.lang.Object invokeLocalOperation(java.lang.String opName,
java.lang.Object[] params)
opName - the operation nameparams - the parameters of the operationpublic void stopRetrying()