001/*
002 * JPPF.
003 * Copyright (C) 2005-2015 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.management;
020
021import java.io.Serializable;
022import java.util.Collection;
023
024import org.jppf.node.policy.ExecutionPolicy;
025
026/**
027 * Marker interface for selecting nodes when using the {@link org.jppf.management.forwarding.JPPFNodeForwardingMBean JPPFNodeForwardingMBean} methods.
028 * @author Laurent Cohen
029 */
030public interface NodeSelector extends Serializable {
031  /**
032   * Constant for a selector which accepts all nodes.
033   */
034  NodeSelector ALL_NODES = new org.jppf.management.AllNodesSelector();
035
036  /**
037   * Selects all nodes.
038   * @deprecated use {@link org.jppf.management.AllNodesSelector} instead.
039   */
040  public static class AllNodesSelector extends org.jppf.management.AllNodesSelector {
041    /**
042     * Explicit serialVersionUID.
043     */
044    private static final long serialVersionUID = 1L;
045  }
046
047  /**
048   * Selects nodes based on an {@link ExecutionPolicy}.
049   * @deprecated use {@link org.jppf.management.ExecutionPolicySelector} instead.
050   */
051  public static class ExecutionPolicySelector extends org.jppf.management.ExecutionPolicySelector {
052    /**
053     * Explicit serialVersionUID.
054     */
055    private static final long serialVersionUID = 1L;
056
057    /**
058     * Initialize this selector with the specified execution policy.
059     * @param policy the execution policy to use to select the nodes.
060     * @deprecated use {@link org.jppf.management.ExecutionPolicySelector} instead.
061     */
062    public ExecutionPolicySelector(final ExecutionPolicy policy) {
063      super(policy);
064    }
065  }
066
067  /**
068   * Selects nodes based on their uuids.
069   * @deprecated use {@link org.jppf.management.UuidSelector} instead.
070   */
071  public static class UuidSelector extends org.jppf.management.UuidSelector {
072    /**
073     * Explicit serialVersionUID.
074     */
075    private static final long serialVersionUID = 1L;
076
077    /**
078     * Initialize this selector with the specified list of node UUIDs.
079     * @param uuids the uuids of the nodes to select.
080     * @deprecated use {@link org.jppf.management.UuidSelector} instead.
081     */
082    public UuidSelector(final Collection<String> uuids) {
083      super(uuids);
084    }
085
086    /**
087     * Initialize this selector with the specified array of node UUIDs.
088     * @param uuids the uuids of the nodes to select.
089     * @deprecated use {@link org.jppf.management.UuidSelector} instead.
090     */
091    public UuidSelector(final String...uuids) {
092      super(uuids);
093    }
094  }
095}