Class SpringTopicSubscriptionImpl
- java.lang.Object
-
- org.camunda.bpm.client.spring.impl.subscription.SpringTopicSubscriptionImpl
-
- All Implemented Interfaces:
SpringTopicSubscription,TopicSubscription,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
PropertiesAwareSpringTopicSubscription
public class SpringTopicSubscriptionImpl extends Object implements SpringTopicSubscription, org.springframework.beans.factory.InitializingBean
-
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.context.ApplicationEventPublisherapplicationEventPublisherprotected ExternalTaskClientclientprotected ExternalTaskHandlerexternalTaskHandlerprotected static SubscriptionLoggerUtilLOGprotected SubscriptionConfigurationsubscriptionConfigurationprotected TopicSubscriptiontopicSubscriptionprotected TopicSubscriptionBuildertopicSubscriptionBuilder
-
Constructor Summary
Constructors Constructor Description SpringTopicSubscriptionImpl()
-
Method Summary
-
-
-
Field Detail
-
LOG
protected static final SubscriptionLoggerUtil LOG
-
subscriptionConfiguration
protected SubscriptionConfiguration subscriptionConfiguration
-
externalTaskHandler
protected ExternalTaskHandler externalTaskHandler
-
topicSubscriptionBuilder
protected TopicSubscriptionBuilder topicSubscriptionBuilder
-
topicSubscription
protected TopicSubscription topicSubscription
-
client
@Autowired protected ExternalTaskClient client
-
applicationEventPublisher
@Autowired protected org.springframework.context.ApplicationEventPublisher applicationEventPublisher
-
-
Method Detail
-
isEventThatCanStartSubscription
protected Predicate<org.springframework.context.ApplicationEvent> isEventThatCanStartSubscription()
-
start
@EventListener public void start(org.springframework.context.ApplicationEvent event)
-
initialize
public void initialize()
-
publishInitializedEvent
protected void publishInitializedEvent(String topicName)
-
open
public void open()
Description copied from interface:SpringTopicSubscriptionReleases the topic subscription for asynchronous execution whenSpringTopicSubscription.isAutoOpen()isfalse- Specified by:
openin interfaceSpringTopicSubscription
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfaceSpringTopicSubscription- Returns:
truewhen the topic subscription is already released for executionfalsewhen the topic subscription is not already released for execution; callSpringTopicSubscription.open()to release the topic for execution
-
closeInternally
public void closeInternally()
-
close
public void close()
Description copied from interface:SpringTopicSubscriptionDelegates toTopicSubscription.close().- Specified by:
closein interfaceSpringTopicSubscription- Specified by:
closein interfaceTopicSubscription- See Also:
TopicSubscription.close()
-
isAutoOpen
public boolean isAutoOpen()
- Specified by:
isAutoOpenin interfaceSpringTopicSubscription- Returns:
truewhen the topic subscription is automatically released for executionfalsewhen you need to callSpringTopicSubscription.open()to release the topic for execution
-
setExternalTaskHandler
public void setExternalTaskHandler(ExternalTaskHandler externalTaskHandler)
-
getSubscriptionConfiguration
public SubscriptionConfiguration getSubscriptionConfiguration()
-
setSubscriptionConfiguration
public void setSubscriptionConfiguration(SubscriptionConfiguration subscriptionConfiguration)
-
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
-
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.
-
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
-
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
-
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
-
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
-
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
-
getProcessVariables
public Map<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
-
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
-
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.
-
-