Class ActivatedJobImpl
- java.lang.Object
-
- io.camunda.zeebe.client.impl.response.ActivatedJobImpl
-
- All Implemented Interfaces:
ActivatedJob
public final class ActivatedJobImpl extends Object implements ActivatedJob
-
-
Constructor Summary
Constructors Constructor Description ActivatedJobImpl(JsonMapper jsonMapper, GatewayOuterClass.ActivatedJob job)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBpmnProcessId()Map<String,String>getCustomHeaders()longgetDeadline()StringgetElementId()longgetElementInstanceKey()longgetKey()longgetProcessDefinitionKey()intgetProcessDefinitionVersion()longgetProcessInstanceKey()intgetRetries()StringgetType()StringgetVariables()Map<String,Object>getVariablesAsMap()<T> TgetVariablesAsType(Class<T> variableType)StringgetWorker()StringtoJson()StringtoString()
-
-
-
Constructor Detail
-
ActivatedJobImpl
public ActivatedJobImpl(JsonMapper jsonMapper, GatewayOuterClass.ActivatedJob job)
-
-
Method Detail
-
getKey
public long getKey()
- Specified by:
getKeyin interfaceActivatedJob- Returns:
- the unique key of the job
-
getType
public String getType()
- Specified by:
getTypein interfaceActivatedJob- Returns:
- the type of the job
-
getProcessInstanceKey
public long getProcessInstanceKey()
- Specified by:
getProcessInstanceKeyin interfaceActivatedJob- Returns:
- key of the process instance
-
getBpmnProcessId
public String getBpmnProcessId()
- Specified by:
getBpmnProcessIdin interfaceActivatedJob- Returns:
- BPMN process id of the process
-
getProcessDefinitionVersion
public int getProcessDefinitionVersion()
- Specified by:
getProcessDefinitionVersionin interfaceActivatedJob- Returns:
- version of the process
-
getProcessDefinitionKey
public long getProcessDefinitionKey()
- Specified by:
getProcessDefinitionKeyin interfaceActivatedJob- Returns:
- key of the process
-
getElementId
public String getElementId()
- Specified by:
getElementIdin interfaceActivatedJob- Returns:
- id of the process element
-
getElementInstanceKey
public long getElementInstanceKey()
- Specified by:
getElementInstanceKeyin interfaceActivatedJob- Returns:
- key of the element instance
-
getCustomHeaders
public Map<String,String> getCustomHeaders()
- Specified by:
getCustomHeadersin interfaceActivatedJob- Returns:
- user-defined headers associated with this job
-
getWorker
public String getWorker()
- Specified by:
getWorkerin interfaceActivatedJob- Returns:
- the assigned worker to complete the job
-
getRetries
public int getRetries()
- Specified by:
getRetriesin interfaceActivatedJob- Returns:
- remaining retries
-
getDeadline
public long getDeadline()
- Specified by:
getDeadlinein interfaceActivatedJob- Returns:
- the unix timestamp until when the job is exclusively assigned to this worker (time unit * is milliseconds since unix epoch). If the deadline is exceeded, it can happen that the job is handed to another worker and the work is performed twice.
-
getVariables
public String getVariables()
- Specified by:
getVariablesin interfaceActivatedJob- Returns:
- JSON-formatted variables
-
getVariablesAsMap
public Map<String,Object> getVariablesAsMap()
- Specified by:
getVariablesAsMapin interfaceActivatedJob- Returns:
- de-serialized variables as map
-
getVariablesAsType
public <T> T getVariablesAsType(Class<T> variableType)
- Specified by:
getVariablesAsTypein interfaceActivatedJob- Returns:
- de-serialized variables as the given type
-
toJson
public String toJson()
- Specified by:
toJsonin interfaceActivatedJob- Returns:
- the record encoded as JSON
-
-