All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hp.autonomy.hod.client.job.JobService Maven / Gradle / Ivy

There is a newer version: 0.25.3
Show newest version
/*
 * Copyright 2015-2016 Hewlett-Packard Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

package com.hp.autonomy.hod.client.job;

import com.hp.autonomy.hod.client.api.authentication.TokenType;
import com.hp.autonomy.hod.client.error.HodErrorException;
import com.hp.autonomy.hod.client.token.TokenProxy;

/**
 * Service for interacting with the job APIs
 * @param  The expected type of the result of jobs retrieved from this service
 */
public interface JobService> {

    /**
     * Retrieve the status of a job using a token proxy provided by a {@link com.hp.autonomy.hod.client.token.TokenProxyService}
     * @param jobId The id of the job
     * @return The status of the job
     * @throws HodErrorException
     */
    T getJobStatus(JobId jobId) throws HodErrorException;

    /**
     * Retrieve the status of a job using the given token proxy
     * @param jobId The id of the job
     * @param tokenProxy The token proxy to use
     * @return The status of the job
     * @throws HodErrorException
     */
    T getJobStatus(TokenProxy tokenProxy, JobId jobId) throws HodErrorException;

    /**
     * Retrieve the status of a job using a token proxy provided by a {@link com.hp.autonomy.hod.client.token.TokenProxyService}
     * @param jobId The id of the job
     * @return The status of the job
     * @throws HodErrorException
     */
    T getJobResult(JobId jobId) throws HodErrorException;

    /**
     * Retrieve the status of a job using the given token proxy
     * @param jobId The id of the job
     * @param tokenProxy The token proxy to use
     * @return The status of the job
     * @throws HodErrorException
     */
    T getJobResult(TokenProxy tokenProxy, JobId jobId) throws HodErrorException;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy