|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.model.IdentifiedType org.apache.camel.model.LoadBalancerDefinition
public class LoadBalancerDefinition
Represents an XML <loadBalancer/> element
Constructor Summary | |
---|---|
|
LoadBalancerDefinition()
|
|
LoadBalancerDefinition(LoadBalancer loadBalancer)
|
protected |
LoadBalancerDefinition(String loadBalancerTypeName)
|
Method Summary | |
---|---|
void |
addProcessor(Processor processor)
Adds a new processor to the load balancer |
protected void |
configureLoadBalancer(LoadBalancer loadBalancer)
Allows derived classes to customize the load balancer |
protected LoadBalancer |
createLoadBalancer(RouteContext routeContext)
Factory method to create the load balancer instance |
LoadBalancer |
getLoadBalancer(RouteContext routeContext)
|
static LoadBalancer |
getLoadBalancer(RouteContext routeContext,
LoadBalancerDefinition type,
String ref)
|
List<Processor> |
getProcessors()
Returns the current processors available to this load balancer |
void |
process(Exchange exchange)
Processes the message exchange |
boolean |
process(Exchange exchange,
AsyncCallback callback)
Processes the message exchange. |
void |
removeProcessor(Processor processor)
Removes the given processor from the load balancer |
protected void |
setProperty(Object bean,
String name,
Object value)
Sets a named property on the data format instance using introspection |
String |
toString()
|
Methods inherited from class org.apache.camel.model.IdentifiedType |
---|
getId, setId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LoadBalancerDefinition()
public LoadBalancerDefinition(LoadBalancer loadBalancer)
protected LoadBalancerDefinition(String loadBalancerTypeName)
Method Detail |
---|
public static LoadBalancer getLoadBalancer(RouteContext routeContext, LoadBalancerDefinition type, String ref)
protected void setProperty(Object bean, String name, Object value)
protected void configureLoadBalancer(LoadBalancer loadBalancer)
public LoadBalancer getLoadBalancer(RouteContext routeContext)
protected LoadBalancer createLoadBalancer(RouteContext routeContext)
public void addProcessor(Processor processor)
LoadBalancer
addProcessor
in interface LoadBalancer
processor
- the processor to be added to the load balancerpublic List<Processor> getProcessors()
LoadBalancer
getProcessors
in interface LoadBalancer
public void removeProcessor(Processor processor)
LoadBalancer
removeProcessor
in interface LoadBalancer
processor
- the processor to be removed from the load balancerpublic void process(Exchange exchange) throws Exception
Processor
process
in interface Processor
exchange
- the message exchange
Exception
- if an internal processing error has occurred.public boolean process(Exchange exchange, AsyncCallback callback)
AsyncProcessor
Processor.process(org.apache.camel.Exchange)
, but the caller supports having the exchange asynchronously processed.
If there was a failure processing then the caused Exception
would be set on the Exchange
.
process
in interface AsyncProcessor
exchange
- the message exchangecallback
- the AsyncCallback
will be invoked when the processing of the exchange is completed.
If the exchange is completed synchronously, then the callback is also invoked synchronously.
The callback should therefore be careful of starting recursive loop.
AsyncProcessorHelper.process(AsyncProcessor, Exchange, AsyncCallback)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |