Class JobWrapper
- java.lang.Object
-
- org.bonitasoft.engine.scheduler.impl.JobWrapper
-
- All Implemented Interfaces:
java.io.Serializable,StatelessJob
public class JobWrapper extends java.lang.Object implements StatelessJob
- Author:
- Matthieu Chaffotte, Celine Souchet
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.bonitasoft.engine.scheduler.StatelessJob
JOB_COMPLETED, JOB_DESCRIPTOR_ID, JOB_EXECUTING
-
-
Constructor Summary
Constructors Constructor Description JobWrapper(JobIdentifier jobIdentifier, StatelessJob statelessJob, long tenantId, EventService eventService, SessionAccessor sessionAccessor, TransactionService transactionService, PersistenceService persistenceService, JobService jobService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Execute the content of the job.java.lang.StringgetDescription()Gets the description of the job.java.lang.StringgetName()Gets the job name.StatelessJobgetStatelessJob()voidsetAttributes(java.util.Map<java.lang.String,java.io.Serializable> attributes)This method is called by the scheduler service before the execution of the job
-
-
-
Constructor Detail
-
JobWrapper
public JobWrapper(JobIdentifier jobIdentifier, StatelessJob statelessJob, long tenantId, EventService eventService, SessionAccessor sessionAccessor, TransactionService transactionService, PersistenceService persistenceService, JobService jobService)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:StatelessJobGets the job name.- Specified by:
getNamein interfaceStatelessJob- Returns:
- the job name
-
getDescription
public java.lang.String getDescription()
Description copied from interface:StatelessJobGets the description of the job.- Specified by:
getDescriptionin interfaceStatelessJob- Returns:
- the job description
-
execute
public void execute() throws SJobExecutionException, SFireEventExceptionDescription copied from interface:StatelessJobExecute the content of the job.- Specified by:
executein interfaceStatelessJob- Throws:
SJobExecutionException- if an exception occursSFireEventException
-
setAttributes
public void setAttributes(java.util.Map<java.lang.String,java.io.Serializable> attributes) throws SJobConfigurationExceptionDescription copied from interface:StatelessJobThis method is called by the scheduler service before the execution of the job- Specified by:
setAttributesin interfaceStatelessJob- Parameters:
attributes- key is the name of the attribute value is the value of the attribute- Throws:
SJobConfigurationException
-
getStatelessJob
public StatelessJob getStatelessJob()
-
-