1 /* 2 * Copyright (C) The Apache Software Foundation. All rights reserved. 3 * 4 * This software is published under the terms of the Apache Software License 5 * version 1.1, a copy of which has been included with this distribution in 6 * the LICENSE.txt file. 7 */ 8 package org.apache.avalon.excalibur.pipeline; 9 10 import java.util.NoSuchElementException; 11 12 /** 13 * This represents a pipeline made up of stages. 14 * 15 * @author <a HREF="mailto:peter@apache.org">Peter Donald</a> 16 */ 17 public interface Pipeline 18 extends Stage 19 { 20 /** 21 * Retrieve size of pipeline (number of stages). 22 * 23 * @return the size of pipeline 24 */ 25 int getSize(); 26 27 /** 28 * Retrieve a particular stage of pipeline 29 * 30 * @param index the index of stage 31 * @return the stage 32 * @exception NoSuchElementException if index >= getSize() or index < 0 33 */ 34 Stage getStage( int index ) 35 throws NoSuchElementException; 36 } 37