Class TopicSubscriptionImpl
- java.lang.Object
-
- org.camunda.bpm.client.topic.impl.TopicSubscriptionImpl
-
- All Implemented Interfaces:
TopicSubscription
public class TopicSubscriptionImpl extends Object implements TopicSubscription
- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbusinessKeyprotected ExternalTaskHandlerexternalTaskHandlerprotected booleanincludeExtensionPropertiesprotected booleanlocalVariablesprotected LonglockDurationprotected StringprocessDefinitionIdprotected List<String>processDefinitionIdInprotected StringprocessDefinitionKeyprotected List<String>processDefinitionKeyInprotected StringprocessDefinitionVersionTagprotected Map<String,Object>processVariablesprotected List<String>tenantIdInprotected StringtopicNameprotected TopicSubscriptionManagertopicSubscriptionManagerprotected List<String>variableNamesprotected booleanwithoutTenantId
-
Constructor Summary
Constructors Constructor Description TopicSubscriptionImpl(String topicName, Long lockDuration, ExternalTaskHandler externalTaskHandler, TopicSubscriptionManager topicSubscriptionManager, List<String> variableNames, String businessKey)
-
Method Summary
-
-
-
Field Detail
-
topicName
protected String topicName
-
lockDuration
protected Long lockDuration
-
externalTaskHandler
protected ExternalTaskHandler externalTaskHandler
-
topicSubscriptionManager
protected TopicSubscriptionManager topicSubscriptionManager
-
localVariables
protected boolean localVariables
-
businessKey
protected String businessKey
-
processDefinitionId
protected String processDefinitionId
-
processDefinitionKey
protected String processDefinitionKey
-
processDefinitionVersionTag
protected String processDefinitionVersionTag
-
withoutTenantId
protected boolean withoutTenantId
-
includeExtensionProperties
protected boolean includeExtensionProperties
-
-
Constructor Detail
-
TopicSubscriptionImpl
public TopicSubscriptionImpl(String topicName, Long lockDuration, ExternalTaskHandler externalTaskHandler, TopicSubscriptionManager topicSubscriptionManager, List<String> variableNames, String businessKey)
-
-
Method Detail
-
getTopicName
public String getTopicName()
- Specified by:
getTopicNamein interfaceTopicSubscription- Returns:
- the topic name of the subscription
-
getLockDuration
public Long getLockDuration()
- Specified by:
getLockDurationin interfaceTopicSubscription- Returns:
- the duration of the lock applied to the topic
- if
null, the client or the default lock duration is applied
-
getExternalTaskHandler
public ExternalTaskHandler getExternalTaskHandler()
- Specified by:
getExternalTaskHandlerin interfaceTopicSubscription- Returns:
- the external task handler of the topic
-
close
public void close()
Description copied from interface:TopicSubscriptionThe client has been unsubscribed from the topic. NB! It can happen, that the changes are not applied immediately, in case the client is currently iterating over the bunch of fetched and locked external tasks. The changes will have affect starting from the next bunch only.- Specified by:
closein interfaceTopicSubscription
-
getVariableNames
public List<String> getVariableNames()
- Specified by:
getVariableNamesin interfaceTopicSubscription- Returns:
- a list of variable names which are supposed to be retrieved
-
isLocalVariables
public boolean isLocalVariables()
- Specified by:
isLocalVariablesin interfaceTopicSubscription- Returns:
- whether or not variables from greater scopes than the external task
are fetched.
falsemeans all variables visible in the scope of the external task will be fetched,truemeans only local variables (to the scope of the external task) will be fetched.
-
setLocalVariables
public void setLocalVariables(boolean localVariables)
-
getBusinessKey
public String getBusinessKey()
- Specified by:
getBusinessKeyin interfaceTopicSubscription- Returns:
- the business key associated with the external tasks which are supposed to be fetched and locked
-
getProcessDefinitionId
public String getProcessDefinitionId()
- Specified by:
getProcessDefinitionIdin interfaceTopicSubscription- Returns:
- the process definition id associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionId
public TopicSubscription setProcessDefinitionId(String processDefinitionId)
-
getProcessDefinitionIdIn
public List<String> getProcessDefinitionIdIn()
- Specified by:
getProcessDefinitionIdInin interfaceTopicSubscription- Returns:
- the process definition ids associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionIdIn
public TopicSubscription setProcessDefinitionIdIn(List<String> processDefinitionIds)
-
getProcessDefinitionKey
public String getProcessDefinitionKey()
- Specified by:
getProcessDefinitionKeyin interfaceTopicSubscription- Returns:
- the process definition key associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionKey
public TopicSubscription setProcessDefinitionKey(String processDefinitionKey)
-
getProcessDefinitionKeyIn
public List<String> getProcessDefinitionKeyIn()
- Specified by:
getProcessDefinitionKeyInin interfaceTopicSubscription- Returns:
- the process definition keys associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionKeyIn
public TopicSubscription setProcessDefinitionKeyIn(List<String> processDefinitionKeys)
-
getProcessDefinitionVersionTag
public String getProcessDefinitionVersionTag()
- Specified by:
getProcessDefinitionVersionTagin interfaceTopicSubscription- Returns:
- the process definition version tag associated with the external task which are supposed to be fetched and locked
-
setProcessDefinitionVersionTag
public void setProcessDefinitionVersionTag(String processDefinitionVersionTag)
-
getProcessVariables
public HashMap<String,Object> getProcessVariables()
- Specified by:
getProcessVariablesin interfaceTopicSubscription- Returns:
- the process variables associated with the external task which are supposed to be fetched and locked
-
isWithoutTenantId
public boolean isWithoutTenantId()
- Specified by:
isWithoutTenantIdin interfaceTopicSubscription- Returns:
- the tenant id presence for the external tasks which are supposed to be fetched and locked
-
setWithoutTenantId
public void setWithoutTenantId(boolean withoutTenantId)
-
getTenantIdIn
public List<String> getTenantIdIn()
- Specified by:
getTenantIdInin interfaceTopicSubscription- Returns:
- the tenant ids associated with the external tasks which are supposed to be fetched and locked
-
setTenantIdIn
public TopicSubscription setTenantIdIn(List<String> tenantIds)
-
isIncludeExtensionProperties
public boolean isIncludeExtensionProperties()
- Specified by:
isIncludeExtensionPropertiesin interfaceTopicSubscription- Returns:
- whether or not custom extension properties defined in the external
task activity are included. The default is
false, which means that no extension properties will be available within the external-task-client.truemeans that all defined extension properties are fetched and provided.
-
setIncludeExtensionProperties
public void setIncludeExtensionProperties(boolean includeExtensionProperties)
-
-