org.apache.camel.component.browse
Class BrowseEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.component.browse.BrowseEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, BrowsableEndpoint

public class BrowseEndpoint
extends DefaultEndpoint
implements BrowsableEndpoint, Service

An endpoint which maintains a List of Exchange instances which can be useful for tooling, debugging and visualising routes.

Version:
$Revision: 736555 $

Constructor Summary
BrowseEndpoint(String endpointUri)
           
BrowseEndpoint(String uri, CamelContext camelContext)
           
BrowseEndpoint(String uri, Component component)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
           
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
protected  List<Exchange> createExchangeList()
           
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 List<Exchange> getExchanges()
          Return the exchanges available on this endpoint
 TopicLoadBalancer getLoadBalancer()
           
 boolean isSingleton()
          Wheter this class supports being singleton or not.
protected  void onExchange(Exchange exchange)
          Invoked on a message exchange being sent by a producer
 void removePropertyChangeListener(PropertyChangeListener listener)
           
 void start()
          Starts the service
 void stop()
          Stops the service
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, convertTo, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, createScheduledExecutorService, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getExecutorService, getScheduledExecutorService, hashCode, isLenientProperties, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setExecutorService, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Endpoint
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointKey, getEndpointUri, isLenientProperties, setCamelContext
 

Constructor Detail

BrowseEndpoint

public BrowseEndpoint(String uri,
                      CamelContext camelContext)

BrowseEndpoint

public BrowseEndpoint(String uri,
                      Component component)

BrowseEndpoint

public BrowseEndpoint(String endpointUri)
Method Detail

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Wheter this class supports being singleton or not.

Specified by:
isSingleton in interface IsSingleton
Returns:
true to be a single shared instance, false to create new instances.

getExchanges

public List<Exchange> getExchanges()
Description copied from interface: BrowsableEndpoint
Return the exchanges available on this endpoint

Specified by:
getExchanges in interface BrowsableEndpoint
Returns:
the exchanges on this endpoint

getLoadBalancer

public TopicLoadBalancer getLoadBalancer()

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Specified by:
createProducer in interface Endpoint
Returns:
a newly created producer
Throws:
Exception - can be thrown

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

createExchangeList

protected List<Exchange> createExchangeList()

onExchange

protected void onExchange(Exchange exchange)
                   throws Exception
Invoked on a message exchange being sent by a producer

Parameters:
exchange - the exchange
Throws:
Exception - is thrown if failed to process the exchange

start

public void start()
           throws Exception
Description copied from interface: Service
Starts the service

Specified by:
start in interface Service
Throws:
Exception

stop

public void stop()
          throws Exception
Description copied from interface: Service
Stops the service

Specified by:
stop in interface Service
Throws:
Exception


Apache CAMEL