org.apache.camel.component.browse
Class BrowseEndpoint

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

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:

Constructor Summary
BrowseEndpoint()
           
BrowseEndpoint(String endpointUri)
           
BrowseEndpoint(String uri, CamelContext camelContext)
           
BrowseEndpoint(String uri, Component component)
           
 
Method Summary
 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
 boolean isSingleton()
          Whether this class supports being singleton or not.
protected  void onExchange(Exchange exchange)
          Invoked on a message exchange being sent by a producer
 void start()
          Starts the service
 void stop()
          Stops the service
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, suspend
 
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()

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
Whether 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

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
Overrides:
start in class ServiceSupport
Throws:
Exception - is thrown if starting failed

stop

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

Specified by:
stop in interface Service
Overrides:
stop in class ServiceSupport
Throws:
Exception - is thrown if stopping failed


Apache CAMEL