org.apache.camel
Interface Channel

All Superinterfaces:
AsyncProcessor, Navigate<Processor>, Processor
All Known Subinterfaces:
ModelChannel
All Known Implementing Classes:
DefaultChannel

public interface Channel
extends AsyncProcessor, Navigate<Processor>

Channel acts as a channel between Processors in the route graph.

The channel is responsible for routing the Exchange to the next Processor in the route graph.

Version:

Method Summary
 void addInterceptStrategies(List<InterceptStrategy> strategy)
          Adds a list of InterceptStrategy to apply each Exchange before its routed to the next Processor.
 void addInterceptStrategy(InterceptStrategy strategy)
          Adds a InterceptStrategy to apply each Exchange before its routed to the next Processor.
 Processor getErrorHandler()
          Gets the ErrorHandler this Channel uses.
 List<InterceptStrategy> getInterceptStrategies()
          Gets the list of InterceptStrategy registered to this Channel.
 Processor getNextProcessor()
          Gets the next Processor to route to (not wrapped)
 Processor getOutput()
          Gets the wrapped output that at runtime should be delegated to.
 RouteContext getRouteContext()
          Gets the RouteContext
 void setErrorHandler(Processor errorHandler)
          Sets the ErrorHandler this Channel uses.
 void setNextProcessor(Processor next)
          Sets the processor that the channel should route the Exchange to.
 void setOutput(Processor output)
          Sets the wrapped output that at runtime should be delegated to.
 
Methods inherited from interface org.apache.camel.AsyncProcessor
process
 
Methods inherited from interface org.apache.camel.Processor
process
 
Methods inherited from interface org.apache.camel.Navigate
hasNext, next
 

Method Detail

setNextProcessor

void setNextProcessor(Processor next)
Sets the processor that the channel should route the Exchange to.

Parameters:
next - the next processor

setErrorHandler

void setErrorHandler(Processor errorHandler)
Sets the ErrorHandler this Channel uses.

Parameters:
errorHandler - the error handler

getErrorHandler

Processor getErrorHandler()
Gets the ErrorHandler this Channel uses.

Returns:
the error handler, or null if no error handler is used.

addInterceptStrategy

void addInterceptStrategy(InterceptStrategy strategy)
Adds a InterceptStrategy to apply each Exchange before its routed to the next Processor.

Parameters:
strategy - the intercept strategy

addInterceptStrategies

void addInterceptStrategies(List<InterceptStrategy> strategy)
Adds a list of InterceptStrategy to apply each Exchange before its routed to the next Processor.

Parameters:
strategy - list of strategies

getInterceptStrategies

List<InterceptStrategy> getInterceptStrategies()
Gets the list of InterceptStrategy registered to this Channel.

Returns:
list of strategies, returns an empty list if no strategies is registered.

getOutput

Processor getOutput()
Gets the wrapped output that at runtime should be delegated to.

Returns:
the output to route the Exchange to

setOutput

void setOutput(Processor output)
Sets the wrapped output that at runtime should be delegated to.

Parameters:
output - the output to route the Exchange to

getNextProcessor

Processor getNextProcessor()
Gets the next Processor to route to (not wrapped)

Returns:
the next processor

getRouteContext

RouteContext getRouteContext()
Gets the RouteContext

Returns:
the route context


Apache CAMEL