001/*
002 * JPPF.
003 * Copyright (C) 2005-2018 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 */
018
019package org.jppf.server.job.management;
020
021import java.io.Serializable;
022
023import org.jppf.job.JobInformation;
024import org.jppf.management.JPPFManagementInfo;
025
026/**
027 * Instances of this cass hold temporary information about a sub-job and the nodes it was dispatched to
028 * @author Laurent Cohen
029 */
030public class NodeJobInformation implements Serializable
031{
032  /**
033   * Explicit serialVersionUID.
034   */
035  private static final long serialVersionUID = 1L;
036  /**
037   * Empty array
038   */
039  public static final NodeJobInformation[]    EMPTY_ARRAY = new NodeJobInformation[0];
040  /**
041   * The information about the node.
042   */
043  public final JPPFManagementInfo nodeInfo;
044  /**
045   * The information about the job dispatch.
046   */
047  public final JobInformation jobInfo;
048
049  /**
050   * 
051   * @param nodeInfo the information about the node.
052   * @param jobInfo the information about the sub-job.
053   */
054  public NodeJobInformation(final JPPFManagementInfo nodeInfo, final JobInformation jobInfo)
055  {
056    this.nodeInfo = nodeInfo;
057    this.jobInfo = jobInfo;
058  }
059
060  /**
061   * Get the information about the node.
062   * @return a {@link JPPFManagementInfo} object.
063   */
064  public JPPFManagementInfo getNodeInfo() {
065    return nodeInfo;
066  }
067
068  /**
069   * Get the information about the job dispatch.
070   * @return a {@link JobInformation} object.
071   */
072  public JobInformation getJobInformation() {
073    return jobInfo;
074  }
075}