001/*
002 * JPPF.
003 * Copyright (C) 2005-2016 JPPF Team.
004 * http://www.jppf.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.jppf.node.protocol;
019
020/**
021 * Common interface for client-side jobs (see {@link org.jppf.client.JPPFJob JPPFJob} and server-side jobs
022 * (see {@link org.jppf.node.protocol.TaskBundle TaskBundle}).
023 * @author Laurent Cohen
024 */
025public interface JPPFDistributedJob {
026  /**
027   * Get the user-defined display name for this job. This is the name displayed in the administration console.
028   * @return the name as a string.
029   */
030  String getName();
031
032  /**
033   * Get the universal unique id for this job.
034   * @return the uuid as a string.
035   */
036  String getUuid();
037
038  /**
039   * Get the service level agreement between the job and the server.
040   * @return an instance of {@link JobSLA}.
041   */
042  JobSLA getSLA();
043
044  /**
045   * Get the user-defined metadata associated with this job.
046   * @return a {@link JobMetadata} instance.
047   */
048  JobMetadata getMetadata();
049
050  /**
051   * Get the number of tasks in the job.
052   * @return the number fo tasks.
053   */
054  int getTaskCount();
055}