|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.model.IdentifiedType
org.apache.camel.model.loadbalancer.LoadBalancerDefinition
public class LoadBalancerDefinition
Represents an XML <loadBalance/> 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 |
| 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, toString, 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 LoadBalancerprocessor - the processor to be added to the load balancerpublic List<Processor> getProcessors()
LoadBalancer
getProcessors in interface LoadBalancerpublic void removeProcessor(Processor processor)
LoadBalancer
removeProcessor in interface LoadBalancerprocessor - the processor to be removed from the load balancer
public void process(Exchange exchange)
throws Exception
Processor
process in interface ProcessorException - if an internal processing error has occurred.
public boolean process(Exchange exchange,
AsyncCallback callback)
AsyncProcessorProcessor.process(org.apache.camel.Exchange), but
the caller supports having the exchange asynchronously processed.
process in interface AsyncProcessorexchange - the Exchange to processcallback - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||