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 Details

  • Constructor Details

    • SpringTopicSubscriptionImpl

      public SpringTopicSubscriptionImpl()
  • Method Details

    • 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: SpringTopicSubscription
      Releases the topic subscription for asynchronous execution when SpringTopicSubscription.isAutoOpen() is false
      Specified by:
      open in interface SpringTopicSubscription
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface SpringTopicSubscription
      Returns:
      • true when the topic subscription is already released for execution
      • false when the topic subscription is not already released for execution; call SpringTopicSubscription.open() to release the topic for execution
    • closeInternally

      public void closeInternally()
    • close

      public void close()
      Description copied from interface: SpringTopicSubscription
      Specified by:
      close in interface SpringTopicSubscription
      Specified by:
      close in interface TopicSubscription
      See Also:
    • isAutoOpen

      public boolean isAutoOpen()
      Specified by:
      isAutoOpen in interface SpringTopicSubscription
      Returns:
      • true when the topic subscription is automatically released for execution
      • false when you need to call SpringTopicSubscription.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:
      getTopicName in interface TopicSubscription
      Returns:
      the topic name of the subscription
    • getLockDuration

      public Long getLockDuration()
      Specified by:
      getLockDuration in interface TopicSubscription
      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 interface TopicSubscription
      Returns:
      the external task handler of the topic
    • getVariableNames

      public List<String> getVariableNames()
      Specified by:
      getVariableNames in interface TopicSubscription
      Returns:
      a list of variable names which are supposed to be retrieved
    • isLocalVariables

      public boolean isLocalVariables()
      Specified by:
      isLocalVariables in interface TopicSubscription
      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.
    • getBusinessKey

      public String getBusinessKey()
      Specified by:
      getBusinessKey in interface TopicSubscription
      Returns:
      the business key associated with the external tasks which are supposed to be fetched and locked
    • getProcessDefinitionId

      public String getProcessDefinitionId()
      Specified by:
      getProcessDefinitionId in interface TopicSubscription
      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:
      getProcessDefinitionIdIn in interface TopicSubscription
      Returns:
      the process definition ids associated with the external tasks which are supposed to be fetched and locked
    • getProcessDefinitionKey

      public String getProcessDefinitionKey()
      Specified by:
      getProcessDefinitionKey in interface TopicSubscription
      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:
      getProcessDefinitionKeyIn in interface TopicSubscription
      Returns:
      the process definition keys associated with the external tasks which are supposed to be fetched and locked
    • getProcessDefinitionVersionTag

      public String getProcessDefinitionVersionTag()
      Specified by:
      getProcessDefinitionVersionTag in interface TopicSubscription
      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:
      getProcessVariables in interface TopicSubscription
      Returns:
      the process variables associated with the external task which are supposed to be fetched and locked
    • isWithoutTenantId

      public boolean isWithoutTenantId()
      Specified by:
      isWithoutTenantId in interface TopicSubscription
      Returns:
      the tenant id presence for the external tasks which are supposed to be fetched and locked
    • getTenantIdIn

      public List<String> getTenantIdIn()
      Specified by:
      getTenantIdIn in interface TopicSubscription
      Returns:
      the tenant ids associated with the external tasks which are supposed to be fetched and locked
    • isIncludeExtensionProperties

      public boolean isIncludeExtensionProperties()
      Specified by:
      isIncludeExtensionProperties in interface TopicSubscription
      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.
    • toArray

      protected String[] toArray(List<String> list)
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception