org.apache.maven.doxia.sink
Class PipelineSink

java.lang.Object
  extended by org.apache.maven.doxia.sink.PipelineSink
All Implemented Interfaces:
InvocationHandler

public class PipelineSink
extends Object
implements InvocationHandler

May be used to invoke the same method on a List of Sinks.

Version:
$Id: PipelineSink.java 1185112 2011-10-17 11:33:00Z ltheussl $
Author:
Trygve Laugstøl

Constructor Summary
PipelineSink(List<Sink> pipeline)
          Constructs a PipelineSink for a given List of Sinks.
 
Method Summary
 void addSink(Sink sink)
          Add a Sink to the List of Sinks.
 Object invoke(Object proxy, Method method, Object[] args)
           Invoke a Method on this PipelineSink.
static Sink newInstance(List<Sink> pipeline)
          Returns an instance of a PipelineSink as a Sink.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelineSink

public PipelineSink(List<Sink> pipeline)
Constructs a PipelineSink for a given List of Sinks.

Parameters:
pipeline - A List of Sinks.
Method Detail

addSink

public void addSink(Sink sink)
Add a Sink to the List of Sinks.

Parameters:
sink - the Sink to add.

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws IllegalAccessException,
                     InvocationTargetException
Invoke a Method on this PipelineSink.

Specified by:
invoke in interface InvocationHandler
Throws:
IllegalAccessException - if any.
InvocationTargetException - if any.

newInstance

public static Sink newInstance(List<Sink> pipeline)
Returns an instance of a PipelineSink as a Sink.

Parameters:
pipeline - A List of Sinks.
Returns:
a Sink object.


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.