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, TechnicalLoggerService logger, 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 void
execute()
Execute the content of the job.java.lang.String
getDescription()
Gets the description of the job.java.lang.String
getName()
Gets the job name.StatelessJob
getStatelessJob()
void
setAttributes(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, TechnicalLoggerService logger, long tenantId, EventService eventService, SessionAccessor sessionAccessor, TransactionService transactionService, PersistenceService persistenceService, JobService jobService)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:StatelessJob
Gets the job name.- Specified by:
getName
in interfaceStatelessJob
- Returns:
- the job name
-
getDescription
public java.lang.String getDescription()
Description copied from interface:StatelessJob
Gets the description of the job.- Specified by:
getDescription
in interfaceStatelessJob
- Returns:
- the job description
-
execute
public void execute() throws SJobExecutionException, SFireEventException
Description copied from interface:StatelessJob
Execute the content of the job.- Specified by:
execute
in interfaceStatelessJob
- Throws:
SJobExecutionException
- if an exception occursSFireEventException
-
setAttributes
public void setAttributes(java.util.Map<java.lang.String,java.io.Serializable> attributes) throws SJobConfigurationException
Description copied from interface:StatelessJob
This method is called by the scheduler service before the execution of the job- Specified by:
setAttributes
in interfaceStatelessJob
- Parameters:
attributes
- key is the name of the attribute value is the value of the attribute- Throws:
SJobConfigurationException
-
getStatelessJob
public StatelessJob getStatelessJob()
-
-