public boolean evaluate(ServiceEndpoint endpoint, MessageExchange exchange) { return component.isExchangeWithConsumerOkay(endpoint, exchange); } }
public boolean isExchangeWithConsumerOkay(ServiceEndpoint endpoint, MessageExchange exchange) { return component.isExchangeWithConsumerOkay(endpoint, exchange); }
public boolean isExchangeWithConsumerOkayForComponent(String componentName, ServiceEndpoint internalEndpoint, MessageExchange exchange) throws JBIException { this.log.start(); Installer installer = this.installersByName.get(componentName); if (installer == null) { throw new JBIException("Cannot find a component '" + componentName + "' in the container"); } boolean result = installer.getComponent().isExchangeWithConsumerOkay(internalEndpoint, exchange); this.log.end(); return result; }
boolean isExchangeOkay(MessageExchange me) { Component provider; provider = mComponentManager.getComponentInstance(((RegisteredEndpoint)((MessageExchangeProxy)me).getActualEndpoint()).getOwnerId()); return (provider.isExchangeWithConsumerOkay(me.getEndpoint(), me)); }
/** * Filter the given endpoints by asking to the provider and consumer if they * are both ok to process the exchange. * * @param endpoints * an array of internal endpoints to check * @param exchange * the exchange that will be serviced * @return an array of endpoints on which both consumer and provider agrees */ protected ServiceEndpoint[] getMatchingEndpoints(ServiceEndpoint[] endpoints, MessageExchangeImpl exchange) { List<ServiceEndpoint> filtered = new ArrayList<ServiceEndpoint>(); ComponentMBeanImpl consumer = getRegistry().getComponent(exchange.getSourceId()); for (int i = 0; i < endpoints.length; i++) { ComponentNameSpace id = ((InternalEndpoint) endpoints[i]).getComponentNameSpace(); if (id != null) { ComponentMBeanImpl provider = getRegistry().getComponent(id); if (provider != null && (!consumer.getComponent().isExchangeWithProviderOkay(endpoints[i], exchange) || !provider.getComponent().isExchangeWithConsumerOkay(endpoints[i], exchange))) { continue; } } filtered.add(endpoints[i]); } return filtered.toArray(new ServiceEndpoint[filtered.size()]); }
/** * (non-Javadoc) * * @see org.objectweb.petals.jbi.management.admin.AdminServiceMBean#isExchangeWithConsumerOkayForComponent(java.lang.String, * javax.jbi.servicedesc.ServiceEndpoint, * javax.jbi.messaging.MessageExchange) */ public boolean isExchangeWithConsumerOkayForComponent(String componentName, ServiceEndpoint internalEndpoint, MessageExchange exchange) throws JBIException { log.call(); ComponentLifeCycle componentLifeCycle = getComponentLifeCycleByName(componentName); if (componentLifeCycle == null) { log.error("No such component " + componentName + " in the container"); throw new JBIException("No such component " + componentName + " in the container"); } return componentLifeCycle.getComponent().isExchangeWithConsumerOkay( internalEndpoint, exchange); }
exchange.beforeCapabilityCheck(endpoint); if (consumer.isExchangeWithProviderOkay(endpoint, exchange) && provider.isExchangeWithConsumerOkay(endpoint, exchange)) { match = endpoint; break;