org.apache.servicemix.drools
Class DroolsEndpoint
java.lang.Object
org.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ProviderEndpoint
org.apache.servicemix.drools.DroolsEndpoint
- All Implemented Interfaces:
- Endpoint
public class DroolsEndpoint
- extends ProviderEndpoint
- Author:
- gnodet
| Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString |
DroolsEndpoint
public DroolsEndpoint()
DroolsEndpoint
public DroolsEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
DroolsEndpoint
public DroolsEndpoint(ServiceUnit su,
QName service,
String endpoint)
getRuleBase
public org.drools.RuleBase getRuleBase()
- Returns:
- the ruleBase
setRuleBase
public void setRuleBase(org.drools.RuleBase ruleBase)
- Parameters:
ruleBase - the ruleBase to set
getRuleBaseResource
public org.springframework.core.io.Resource getRuleBaseResource()
- Returns:
- the ruleBaseResource
setRuleBaseResource
public void setRuleBaseResource(org.springframework.core.io.Resource ruleBaseResource)
- Parameters:
ruleBaseResource - the ruleBaseResource to set
getRuleBaseURL
public URL getRuleBaseURL()
- Returns:
- the ruleBaseURL
setRuleBaseURL
public void setRuleBaseURL(URL ruleBaseURL)
- Parameters:
ruleBaseURL - the ruleBaseURL to set
getNamespaceContext
public NamespaceContext getNamespaceContext()
- Returns:
- the namespaceContext
setNamespaceContext
public void setNamespaceContext(NamespaceContext namespaceContext)
- Parameters:
namespaceContext - the namespaceContext to set
getGlobals
public Map<String,Object> getGlobals()
- Returns:
- the variables
setGlobals
public void setGlobals(Map<String,Object> variables)
- Parameters:
variables - the variables to set
isAutoReply
public boolean isAutoReply()
- Will this endpoint automatically reply to any exchanges not handled by the Drools rulebase?
- Returns:
true if the endpoint replies to any unanswered exchanges
setAutoReply
public void setAutoReply(boolean autoReply)
- Set auto-reply to
true to ensure that every exchange is being replied to.
This way, you can avoid having to end every Drools rule with jbi.answer()
- Parameters:
autoReply - true for auto-replying on incoming exchanges
validate
public void validate()
throws javax.jbi.management.DeploymentException
- Specified by:
validate in interface Endpoint- Overrides:
validate in class AbstractEndpoint
- Throws:
javax.jbi.management.DeploymentException
start
public void start()
throws Exception
- Specified by:
start in interface Endpoint- Overrides:
start in class SimpleEndpoint
- Throws:
Exception
process
public void process(javax.jbi.messaging.MessageExchange exchange)
throws Exception
- Specified by:
process in interface Endpoint- Overrides:
process in class ProviderEndpoint
- Throws:
Exception
getCorrelationId
public static String getCorrelationId(javax.jbi.messaging.MessageExchange exchange)
drools
protected void drools(javax.jbi.messaging.MessageExchange exchange)
throws Exception
- Throws:
Exception
getDefaultTargetService
public QName getDefaultTargetService()
setDefaultTargetService
public void setDefaultTargetService(QName defaultTargetService)
getDefaultTargetURI
public String getDefaultTargetURI()
setDefaultTargetURI
public void setDefaultTargetURI(String defaultTargetURI)
getAssertedObjects
public List<Object> getAssertedObjects()
setAssertedObjects
public void setAssertedObjects(List<Object> assertedObjects)
getDefaultRouteURI
public String getDefaultRouteURI()
send
protected void send(javax.jbi.messaging.MessageExchange me)
throws javax.jbi.messaging.MessagingException
- Overrides:
send in class SimpleEndpoint
- Throws:
javax.jbi.messaging.MessagingException
Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.