org.apache.camel
Interface Producer

All Superinterfaces:
IsSingleton, Processor, Service
All Known Implementing Classes:
CollectionProducer, DefaultAsyncProducer, DefaultProducer, DirectProducer, DirectVmProducer, GenericFileProducer, LanguageProducer, LogProducer, SedaProducer, SynchronousDelegateProducer, UnitOfWorkProducer

public interface Producer
extends Processor, Service, IsSingleton

Provides a channel on which clients can create and invoke message exchanges on an Endpoint

Version:

Method Summary
 Exchange createExchange()
          Creates a new exchange to send to this endpoint
 Exchange createExchange(Exchange exchange)
          Deprecated. will be removed in Camel 3.0
 Exchange createExchange(ExchangePattern pattern)
          Creates a new exchange of the given pattern to send to this endpoint
 Endpoint getEndpoint()
          Gets the endpoint this producer sends to.
 
Methods inherited from interface org.apache.camel.Processor
process
 
Methods inherited from interface org.apache.camel.Service
start, stop
 
Methods inherited from interface org.apache.camel.IsSingleton
isSingleton
 

Method Detail

getEndpoint

Endpoint getEndpoint()
Gets the endpoint this producer sends to.

Returns:
the endpoint

createExchange

Exchange createExchange()
Creates a new exchange to send to this endpoint

Returns:
a newly created exchange

createExchange

Exchange createExchange(ExchangePattern pattern)
Creates a new exchange of the given pattern to send to this endpoint

Parameters:
pattern - the exchange pattern
Returns:
a newly created exchange

createExchange

@Deprecated
Exchange createExchange(Exchange exchange)
Deprecated. will be removed in Camel 3.0

Creates a new exchange for communicating with this exchange using the given exchange to pre-populate the values of the headers and messages

Parameters:
exchange - the existing exchange
Returns:
the created exchange


Apache CAMEL