Class TopicSubscriptionBuilderImpl
- java.lang.Object
- 
- org.camunda.bpm.client.topic.impl.TopicSubscriptionBuilderImpl
 
- 
- All Implemented Interfaces:
- TopicSubscriptionBuilder
 
 public class TopicSubscriptionBuilderImpl extends java.lang.Object implements TopicSubscriptionBuilder - Author:
- Tassilo Weidner
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.StringbusinessKeyprotected ExternalTaskHandlerexternalTaskHandlerprotected booleanincludeExtensionPropertiesprotected booleanlocalVariablesprotected java.lang.LonglockDurationprotected static ExternalTaskClientLoggerLOGprotected java.lang.StringprocessDefinitionIdprotected java.util.List<java.lang.String>processDefinitionIdsprotected java.lang.StringprocessDefinitionKeyprotected java.util.List<java.lang.String>processDefinitionKeysprotected java.lang.StringprocessDefinitionVersionTagprotected java.util.Map<java.lang.String,java.lang.Object>processVariablesprotected java.util.List<java.lang.String>tenantIdsprotected java.lang.StringtopicNameprotected TopicSubscriptionManagertopicSubscriptionManagerprotected java.util.List<java.lang.String>variableNamesprotected booleanwithoutTenantId
 - 
Constructor SummaryConstructors Constructor Description TopicSubscriptionBuilderImpl(java.lang.String topicName, TopicSubscriptionManager topicSubscriptionManager)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description TopicSubscriptionBuilderbusinessKey(java.lang.String businessKey)protected voidensureNotNull(java.lang.Object tenantIds, java.lang.String parameterName)TopicSubscriptionBuilderhandler(ExternalTaskHandler externalTaskHandler)TopicSubscriptionBuilderincludeExtensionProperties(boolean includeExtensionProperties)TopicSubscriptionBuilderlocalVariables(boolean localVariables)TopicSubscriptionBuilderlockDuration(long lockDuration)TopicSubscriptionopen()Release the topic subscription for being executed asynchronouslyTopicSubscriptionBuilderprocessDefinitionId(java.lang.String processDefinitionId)TopicSubscriptionBuilderprocessDefinitionIdIn(java.lang.String... processDefinitionIds)TopicSubscriptionBuilderprocessDefinitionKey(java.lang.String processDefinitionKey)TopicSubscriptionBuilderprocessDefinitionKeyIn(java.lang.String... processDefinitionKeys)TopicSubscriptionBuilderprocessDefinitionVersionTag(java.lang.String processDefinitionVersionTag)TopicSubscriptionBuilderprocessVariableEquals(java.lang.String name, java.lang.Object value)TopicSubscriptionBuilderprocessVariablesEqualsIn(java.util.Map<java.lang.String,java.lang.Object> processVariables)TopicSubscriptionBuildertenantIdIn(java.lang.String... tenantIds)TopicSubscriptionBuildervariables(java.lang.String... variableNames)TopicSubscriptionBuilderwithoutTenantId()Filter for external tasks without tenant
 
- 
- 
- 
Field Detail- 
LOGprotected static final ExternalTaskClientLogger LOG 
 - 
topicNameprotected java.lang.String topicName 
 - 
lockDurationprotected java.lang.Long lockDuration 
 - 
variableNamesprotected java.util.List<java.lang.String> variableNames 
 - 
localVariablesprotected boolean localVariables 
 - 
businessKeyprotected java.lang.String businessKey 
 - 
processDefinitionIdprotected java.lang.String processDefinitionId 
 - 
processDefinitionIdsprotected java.util.List<java.lang.String> processDefinitionIds 
 - 
processDefinitionKeyprotected java.lang.String processDefinitionKey 
 - 
processDefinitionKeysprotected java.util.List<java.lang.String> processDefinitionKeys 
 - 
processDefinitionVersionTagprotected java.lang.String processDefinitionVersionTag 
 - 
processVariablesprotected java.util.Map<java.lang.String,java.lang.Object> processVariables 
 - 
withoutTenantIdprotected boolean withoutTenantId 
 - 
tenantIdsprotected java.util.List<java.lang.String> tenantIds 
 - 
externalTaskHandlerprotected ExternalTaskHandler externalTaskHandler 
 - 
topicSubscriptionManagerprotected TopicSubscriptionManager topicSubscriptionManager 
 - 
includeExtensionPropertiesprotected boolean includeExtensionProperties 
 
- 
 - 
Constructor Detail- 
TopicSubscriptionBuilderImplpublic TopicSubscriptionBuilderImpl(java.lang.String topicName, TopicSubscriptionManager topicSubscriptionManager)
 
- 
 - 
Method Detail- 
lockDurationpublic TopicSubscriptionBuilder lockDuration(long lockDuration) - Specified by:
- lockDurationin interface- TopicSubscriptionBuilder
- Parameters:
- lockDuration-- in milliseconds to lock the external tasks
- must be greater than zero
- the default lock duration is 20 seconds (20,000 milliseconds)
- overrides the lock duration configured on bootstrapping the client
 
- Returns:
- the builder
 
 - 
handlerpublic TopicSubscriptionBuilder handler(ExternalTaskHandler externalTaskHandler) - Specified by:
- handlerin interface- TopicSubscriptionBuilder
- Parameters:
- externalTaskHandler- which will be executed for the external task
- Returns:
- the builder
 
 - 
variablespublic TopicSubscriptionBuilder variables(java.lang.String... variableNames) - Specified by:
- variablesin interface- TopicSubscriptionBuilder
- Parameters:
- variableNames- of variables which are supposed to be retrieved
- Returns:
- the builder
 
 - 
localVariablespublic TopicSubscriptionBuilder localVariables(boolean localVariables) - Specified by:
- localVariablesin interface- TopicSubscriptionBuilder
- Parameters:
- localVariables- whether or not variables from greater scope than the external task should be 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
- Returns:
- the builder
 
 - 
businessKeypublic TopicSubscriptionBuilder businessKey(java.lang.String businessKey) - Specified by:
- businessKeyin interface- TopicSubscriptionBuilder
- Parameters:
- businessKey- to filter for external tasks that are supposed to be fetched and locked
- Returns:
- the builder
 
 - 
processDefinitionIdpublic TopicSubscriptionBuilder processDefinitionId(java.lang.String processDefinitionId) - Specified by:
- processDefinitionIdin interface- TopicSubscriptionBuilder
- Parameters:
- processDefinitionId- to filter for external tasks that are supposed to be fetched and locked
- Returns:
- the builder
 
 - 
processDefinitionIdInpublic TopicSubscriptionBuilder processDefinitionIdIn(java.lang.String... processDefinitionIds) - Specified by:
- processDefinitionIdInin interface- TopicSubscriptionBuilder
- Parameters:
- processDefinitionIds- to filter for external tasks that are supposed to be fetched and locked
- Returns:
- the builder
 
 - 
processDefinitionKeypublic TopicSubscriptionBuilder processDefinitionKey(java.lang.String processDefinitionKey) - Specified by:
- processDefinitionKeyin interface- TopicSubscriptionBuilder
- Parameters:
- processDefinitionKey- to filter for external tasks that are supposed to be fetched and locked
- Returns:
- the builder
 
 - 
processDefinitionKeyInpublic TopicSubscriptionBuilder processDefinitionKeyIn(java.lang.String... processDefinitionKeys) - Specified by:
- processDefinitionKeyInin interface- TopicSubscriptionBuilder
- Parameters:
- processDefinitionKeys- to filter for external tasks that are supposed to be fetched and locked
- Returns:
- the builder
 
 - 
processDefinitionVersionTagpublic TopicSubscriptionBuilder processDefinitionVersionTag(java.lang.String processDefinitionVersionTag) - Specified by:
- processDefinitionVersionTagin interface- TopicSubscriptionBuilder
- Returns:
- the builder
 
 - 
processVariablesEqualsInpublic TopicSubscriptionBuilder processVariablesEqualsIn(java.util.Map<java.lang.String,java.lang.Object> processVariables) - Specified by:
- processVariablesEqualsInin interface- TopicSubscriptionBuilder
- Parameters:
- processVariables- of which the external tasks to be retrieved are related to
- Returns:
- the builder
 
 - 
processVariableEqualspublic TopicSubscriptionBuilder processVariableEquals(java.lang.String name, java.lang.Object value) - Specified by:
- processVariableEqualsin interface- TopicSubscriptionBuilder
- Returns:
- the builder
 
 - 
withoutTenantIdpublic TopicSubscriptionBuilder withoutTenantId() Description copied from interface:TopicSubscriptionBuilderFilter for external tasks without tenant- Specified by:
- withoutTenantIdin interface- TopicSubscriptionBuilder
- Returns:
- the builder
 
 - 
tenantIdInpublic TopicSubscriptionBuilder tenantIdIn(java.lang.String... tenantIds) - Specified by:
- tenantIdInin interface- TopicSubscriptionBuilder
- Parameters:
- tenantIds- to filter for external tasks that are supposed to be fetched and locked
- Returns:
- the builder
 
 - 
includeExtensionPropertiespublic TopicSubscriptionBuilder includeExtensionProperties(boolean includeExtensionProperties) - Specified by:
- includeExtensionPropertiesin interface- TopicSubscriptionBuilder
- Parameters:
- includeExtensionProperties- whether or not to include custom extension properties for fetched external tasks.- truemeans all extensionProperties defined in the external task activity will be provided.- falsemeans custom extension properties are not available within the external-task-client. The default is- false.
- Returns:
- the builder
 
 - 
openpublic TopicSubscription open() Description copied from interface:TopicSubscriptionBuilderRelease the topic subscription for being executed asynchronously- Specified by:
- openin interface- TopicSubscriptionBuilder
- Returns:
- the builder
 
 - 
ensureNotNullprotected void ensureNotNull(java.lang.Object tenantIds, java.lang.String parameterName)
 
- 
 
-