KIE Remote Services :: Services 6.1.0.CR2

org.kie.remote.services.rest.async
Class JobResultManager

java.lang.Object
  extended by org.kie.remote.services.rest.async.JobResultManager

@ApplicationScoped
public class JobResultManager
extends Object

This class caches the job result information in order to provide it upon request (so that users can check the status of a deployment or undeployment job).


Constructor Summary
JobResultManager()
           
 
Method Summary
 JaxbDeploymentJobResult getJob(String jobId)
          Get a job using the job's unique id
 JaxbDeploymentJobResult getMostRecentJob(String deploymentId)
          Get the most recent job requested for a given deployment
 void putJob(String jobId, JaxbDeploymentJobResult job, JobType jobType)
          Add a job to the cache
 void start()
          Initialization method to initialize the 2 caches that hold the job result information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobResultManager

public JobResultManager()
Method Detail

start

@PostConstruct
public void start()
Initialization method to initialize the 2 caches that hold the job result information.


putJob

public void putJob(String jobId,
                   JaxbDeploymentJobResult job,
                   JobType jobType)
Add a job to the cache

Parameters:
jobId - The unique id of the job (unique to the kie-services-remote code)
job - The job to cache
jobType - The job type, for logging purposes

getJob

public JaxbDeploymentJobResult getJob(String jobId)
Get a job using the job's unique id

Parameters:
jobId - The job id
Returns:
The JaxbDeploymentJobResult instance

getMostRecentJob

public JaxbDeploymentJobResult getMostRecentJob(String deploymentId)
Get the most recent job requested for a given deployment

Parameters:
deploymentId - The id of the deployment
Returns:
The JaxbDeploymentJobResult with the job information

KIE Remote Services :: Services 6.1.0.CR2

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.