public class DroolsEndpoint extends ProviderEndpoint
loggerdefinition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
DroolsEndpoint() |
DroolsEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint) |
DroolsEndpoint(ServiceUnit su,
javax.xml.namespace.QName service,
java.lang.String endpoint) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
drools(javax.jbi.messaging.MessageExchange exchange) |
java.util.List<java.lang.Object> |
getAssertedObjects() |
static java.lang.String |
getCorrelationId(javax.jbi.messaging.MessageExchange exchange) |
java.lang.String |
getDefaultRouteURI() |
javax.xml.namespace.QName |
getDefaultTargetService() |
java.lang.String |
getDefaultTargetURI() |
java.util.Map<java.lang.String,java.lang.Object> |
getGlobals() |
javax.xml.namespace.NamespaceContext |
getNamespaceContext() |
org.drools.RuleBase |
getRuleBase() |
org.springframework.core.io.Resource |
getRuleBaseResource() |
java.net.URL |
getRuleBaseURL() |
boolean |
isAutoReply()
Will this endpoint automatically reply to any exchanges not handled by the Drools rulebase?
|
void |
process(javax.jbi.messaging.MessageExchange exchange) |
protected void |
send(javax.jbi.messaging.MessageExchange me) |
void |
setAssertedObjects(java.util.List<java.lang.Object> assertedObjects)
List of additional objects to be inserted into the drools working memory for evaluating rules.
|
void |
setAutoReply(boolean autoReply)
Set auto-reply to
true to ensure that every exchange is being replied to. |
void |
setDefaultTargetService(javax.xml.namespace.QName defaultTargetService)
The default service that the exchange will be sent to if none of the rules have handled it.
|
void |
setDefaultTargetURI(java.lang.String defaultTargetURI)
The default endpoint URI that the exchange will be sent to if none of the rules have handled it.
|
void |
setGlobals(java.util.Map<java.lang.String,java.lang.Object> variables)
The global variables that are available while evaluating the rule base.
|
void |
setNamespaceContext(javax.xml.namespace.NamespaceContext namespaceContext)
The namespace context to use when evaluating the rules.
|
void |
setRuleBase(org.drools.RuleBase ruleBase)
Set the rule base to be used for handling the exchanges
|
void |
setRuleBaseResource(org.springframework.core.io.Resource ruleBaseResource)
Specifies the resource location to load the rule base from (.drl file)
|
void |
setRuleBaseURL(java.net.URL ruleBaseURL)
Specifies a URL to load the rule base from (.drl file)
|
void |
start() |
void |
validate() |
activate, deactivate, getRole, processInOnly, processInOutdone, fail, getChannel, getContext, getExchangeFactory, sendSync, stopgetDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toStringpublic DroolsEndpoint()
public DroolsEndpoint(DefaultComponent component, javax.jbi.servicedesc.ServiceEndpoint endpoint)
public DroolsEndpoint(ServiceUnit su, javax.xml.namespace.QName service, java.lang.String endpoint)
public org.drools.RuleBase getRuleBase()
public void setRuleBase(org.drools.RuleBase ruleBase)
ruleBase - the ruleBase to setpublic org.springframework.core.io.Resource getRuleBaseResource()
public void setRuleBaseResource(org.springframework.core.io.Resource ruleBaseResource)
ruleBaseResource - the ruleBaseResource to setpublic java.net.URL getRuleBaseURL()
public void setRuleBaseURL(java.net.URL ruleBaseURL)
ruleBaseURL - the ruleBaseURL to setpublic javax.xml.namespace.NamespaceContext getNamespaceContext()
public void setNamespaceContext(javax.xml.namespace.NamespaceContext namespaceContext)
namespaceContext - the namespaceContext to setpublic java.util.Map<java.lang.String,java.lang.Object> getGlobals()
public void setGlobals(java.util.Map<java.lang.String,java.lang.Object> variables)
variables - the variables to setpublic boolean isAutoReply()
true if the endpoint replies to any unanswered exchangespublic void setAutoReply(boolean autoReply)
true to ensure that every exchange is being replied to.
This way, you can avoid having to end every Drools rule with jbi.answer().
Defaults to falseautoReply - true for auto-replying on incoming exchangespublic void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class AbstractEndpointjavax.jbi.management.DeploymentExceptionpublic void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exceptionpublic void process(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
process in interface Endpointprocess in class ProviderEndpointjava.lang.Exceptionpublic static java.lang.String getCorrelationId(javax.jbi.messaging.MessageExchange exchange)
protected void drools(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
java.lang.Exceptionpublic javax.xml.namespace.QName getDefaultTargetService()
public void setDefaultTargetService(javax.xml.namespace.QName defaultTargetService)
defaultTargetService - public java.lang.String getDefaultTargetURI()
public void setDefaultTargetURI(java.lang.String defaultTargetURI)
defaultTargetURI - public java.util.List<java.lang.Object> getAssertedObjects()
public void setAssertedObjects(java.util.List<java.lang.Object> assertedObjects)
assertedObjects - public java.lang.String getDefaultRouteURI()
protected void send(javax.jbi.messaging.MessageExchange me)
throws javax.jbi.messaging.MessagingException
send in class SimpleEndpointjavax.jbi.messaging.MessagingExceptionCopyright © 2005-2016 FuseSource. All Rights Reserved.