Class TopicSubscriptionImpl
- java.lang.Object
-
- org.camunda.bpm.client.topic.impl.TopicSubscriptionImpl
-
- All Implemented Interfaces:
TopicSubscription
public class TopicSubscriptionImpl extends java.lang.Object implements TopicSubscription
- Author:
- Tassilo Weidner
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
businessKey
protected ExternalTaskHandler
externalTaskHandler
protected boolean
includeExtensionProperties
protected boolean
localVariables
protected java.lang.Long
lockDuration
protected java.lang.String
processDefinitionId
protected java.util.List<java.lang.String>
processDefinitionIdIn
protected java.lang.String
processDefinitionKey
protected java.util.List<java.lang.String>
processDefinitionKeyIn
protected java.lang.String
processDefinitionVersionTag
protected java.util.Map<java.lang.String,java.lang.Object>
processVariables
protected java.util.List<java.lang.String>
tenantIdIn
protected java.lang.String
topicName
protected TopicSubscriptionManager
topicSubscriptionManager
protected java.util.List<java.lang.String>
variableNames
protected boolean
withoutTenantId
-
Constructor Summary
Constructors Constructor Description TopicSubscriptionImpl(java.lang.String topicName, java.lang.Long lockDuration, ExternalTaskHandler externalTaskHandler, TopicSubscriptionManager topicSubscriptionManager, java.util.List<java.lang.String> variableNames, java.lang.String businessKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
The client has been unsubscribed from the topic.boolean
equals(java.lang.Object obj)
java.lang.String
getBusinessKey()
ExternalTaskHandler
getExternalTaskHandler()
java.lang.Long
getLockDuration()
java.lang.String
getProcessDefinitionId()
java.util.List<java.lang.String>
getProcessDefinitionIdIn()
java.lang.String
getProcessDefinitionKey()
java.util.List<java.lang.String>
getProcessDefinitionKeyIn()
java.lang.String
getProcessDefinitionVersionTag()
java.util.HashMap<java.lang.String,java.lang.Object>
getProcessVariables()
java.util.List<java.lang.String>
getTenantIdIn()
java.lang.String
getTopicName()
java.util.List<java.lang.String>
getVariableNames()
int
hashCode()
boolean
isIncludeExtensionProperties()
boolean
isLocalVariables()
boolean
isWithoutTenantId()
void
setIncludeExtensionProperties(boolean includeExtensionProperties)
void
setLocalVariables(boolean localVariables)
TopicSubscription
setProcessDefinitionId(java.lang.String processDefinitionId)
TopicSubscription
setProcessDefinitionIdIn(java.util.List<java.lang.String> processDefinitionIds)
TopicSubscription
setProcessDefinitionKey(java.lang.String processDefinitionKey)
TopicSubscription
setProcessDefinitionKeyIn(java.util.List<java.lang.String> processDefinitionKeys)
void
setProcessDefinitionVersionTag(java.lang.String processDefinitionVersionTag)
void
setProcessVariables(java.util.Map<java.lang.String,java.lang.Object> processVariables)
TopicSubscription
setTenantIdIn(java.util.List<java.lang.String> tenantIds)
void
setWithoutTenantId(boolean withoutTenantId)
-
-
-
Field Detail
-
topicName
protected java.lang.String topicName
-
lockDuration
protected java.lang.Long lockDuration
-
externalTaskHandler
protected ExternalTaskHandler externalTaskHandler
-
topicSubscriptionManager
protected TopicSubscriptionManager topicSubscriptionManager
-
variableNames
protected java.util.List<java.lang.String> variableNames
-
localVariables
protected boolean localVariables
-
businessKey
protected java.lang.String businessKey
-
processDefinitionId
protected java.lang.String processDefinitionId
-
processDefinitionIdIn
protected java.util.List<java.lang.String> processDefinitionIdIn
-
processDefinitionKey
protected java.lang.String processDefinitionKey
-
processDefinitionKeyIn
protected java.util.List<java.lang.String> processDefinitionKeyIn
-
processDefinitionVersionTag
protected java.lang.String processDefinitionVersionTag
-
processVariables
protected java.util.Map<java.lang.String,java.lang.Object> processVariables
-
withoutTenantId
protected boolean withoutTenantId
-
tenantIdIn
protected java.util.List<java.lang.String> tenantIdIn
-
includeExtensionProperties
protected boolean includeExtensionProperties
-
-
Constructor Detail
-
TopicSubscriptionImpl
public TopicSubscriptionImpl(java.lang.String topicName, java.lang.Long lockDuration, ExternalTaskHandler externalTaskHandler, TopicSubscriptionManager topicSubscriptionManager, java.util.List<java.lang.String> variableNames, java.lang.String businessKey)
-
-
Method Detail
-
getTopicName
public java.lang.String getTopicName()
- Specified by:
getTopicName
in interfaceTopicSubscription
- Returns:
- the topic name of the subscription
-
getLockDuration
public java.lang.Long getLockDuration()
- Specified by:
getLockDuration
in 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:
getExternalTaskHandler
in interfaceTopicSubscription
- Returns:
- the external task handler of the topic
-
close
public void close()
Description copied from interface:TopicSubscription
The 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:
close
in interfaceTopicSubscription
-
getVariableNames
public java.util.List<java.lang.String> getVariableNames()
- Specified by:
getVariableNames
in interfaceTopicSubscription
- Returns:
- a list of variable names which are supposed to be retrieved
-
isLocalVariables
public boolean isLocalVariables()
- Specified by:
isLocalVariables
in interfaceTopicSubscription
- Returns:
- whether or not variables from greater scopes than the external task
are fetched.
false
means all variables visible in the scope of the external task will be fetched,true
means only local variables (to the scope of the external task) will be fetched.
-
setLocalVariables
public void setLocalVariables(boolean localVariables)
-
getBusinessKey
public java.lang.String getBusinessKey()
- Specified by:
getBusinessKey
in interfaceTopicSubscription
- Returns:
- the business key associated with the external tasks which are supposed to be fetched and locked
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
- Specified by:
getProcessDefinitionId
in interfaceTopicSubscription
- Returns:
- the process definition id associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionId
public TopicSubscription setProcessDefinitionId(java.lang.String processDefinitionId)
-
getProcessDefinitionIdIn
public java.util.List<java.lang.String> getProcessDefinitionIdIn()
- Specified by:
getProcessDefinitionIdIn
in interfaceTopicSubscription
- Returns:
- the process definition ids associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionIdIn
public TopicSubscription setProcessDefinitionIdIn(java.util.List<java.lang.String> processDefinitionIds)
-
getProcessDefinitionKey
public java.lang.String getProcessDefinitionKey()
- Specified by:
getProcessDefinitionKey
in interfaceTopicSubscription
- Returns:
- the process definition key associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionKey
public TopicSubscription setProcessDefinitionKey(java.lang.String processDefinitionKey)
-
getProcessDefinitionKeyIn
public java.util.List<java.lang.String> getProcessDefinitionKeyIn()
- Specified by:
getProcessDefinitionKeyIn
in interfaceTopicSubscription
- Returns:
- the process definition keys associated with the external tasks which are supposed to be fetched and locked
-
setProcessDefinitionKeyIn
public TopicSubscription setProcessDefinitionKeyIn(java.util.List<java.lang.String> processDefinitionKeys)
-
getProcessDefinitionVersionTag
public java.lang.String getProcessDefinitionVersionTag()
- Specified by:
getProcessDefinitionVersionTag
in interfaceTopicSubscription
- Returns:
- the process definition version tag associated with the external task which are supposed to be fetched and locked
-
setProcessDefinitionVersionTag
public void setProcessDefinitionVersionTag(java.lang.String processDefinitionVersionTag)
-
getProcessVariables
public java.util.HashMap<java.lang.String,java.lang.Object> getProcessVariables()
- Specified by:
getProcessVariables
in interfaceTopicSubscription
- Returns:
- the process variables associated with the external task which are supposed to be fetched and locked
-
setProcessVariables
public void setProcessVariables(java.util.Map<java.lang.String,java.lang.Object> processVariables)
-
isWithoutTenantId
public boolean isWithoutTenantId()
- Specified by:
isWithoutTenantId
in 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 java.util.List<java.lang.String> getTenantIdIn()
- Specified by:
getTenantIdIn
in interfaceTopicSubscription
- Returns:
- the tenant ids associated with the external tasks which are supposed to be fetched and locked
-
setTenantIdIn
public TopicSubscription setTenantIdIn(java.util.List<java.lang.String> tenantIds)
-
isIncludeExtensionProperties
public boolean isIncludeExtensionProperties()
- Specified by:
isIncludeExtensionProperties
in 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.true
means that all defined extension properties are fetched and provided.
-
setIncludeExtensionProperties
public void setIncludeExtensionProperties(boolean includeExtensionProperties)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-