org.apache.camel.processor
Class DelegateProcessor

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.processor.DelegateProcessor
All Implemented Interfaces:
Navigate<Processor>, Processor, Service, ShutdownableService

public class DelegateProcessor
extends ServiceSupport
implements Processor, Navigate<Processor>

A Delegate pattern which delegates processing to a nested Processor which can be useful for implementation inheritance when writing an Policy

Important: This implementation does not support the asynchronous routing engine. If you are implementing a EIP pattern please use the DelegateAsyncProcessor instead.

Version:
$Revision: 20042 $
See Also:
DelegateAsyncProcessor

Field Summary
protected  Processor processor
           
 
Constructor Summary
DelegateProcessor()
           
DelegateProcessor(Processor processor)
           
 
Method Summary
protected  void doStart()
           
protected  void doStop()
           
 Processor getProcessor()
           
 boolean hasNext()
          Are there more outputs?
 List<Processor> next()
          Next group of outputs
 void proceed(Exchange exchange)
          Deprecated. will be removed in Camel 2.5
 void process(Exchange exchange)
          Processes the message exchange
protected  void processNext(Exchange exchange)
           
 void setProcessor(Processor processor)
           
 String toString()
           
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doShutdown, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, removeChildService, shutdown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

processor

protected Processor processor
Constructor Detail

DelegateProcessor

public DelegateProcessor()

DelegateProcessor

public DelegateProcessor(Processor processor)
Method Detail

process

public void process(Exchange exchange)
             throws Exception
Description copied from interface: Processor
Processes the message exchange

Specified by:
process in interface Processor
Parameters:
exchange - the message exchange
Throws:
Exception - if an internal processing error has occurred.

processNext

protected void processNext(Exchange exchange)
                    throws Exception
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Object

getProcessor

public Processor getProcessor()

setProcessor

public void setProcessor(Processor processor)

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class ServiceSupport
Throws:
Exception

proceed

@Deprecated
public void proceed(Exchange exchange)
             throws Exception
Deprecated. will be removed in Camel 2.5

Proceed with the underlying delegated processor

Throws:
Exception

hasNext

public boolean hasNext()
Description copied from interface: Navigate
Are there more outputs?

Specified by:
hasNext in interface Navigate<Processor>
Returns:
true if more outputs

next

public List<Processor> next()
Description copied from interface: Navigate
Next group of outputs

Specified by:
next in interface Navigate<Processor>
Returns:
next group or null if no more outputs


Copyright © 2007-2010 IONA Open Source Community. All Rights Reserved.