public ComponentLifeCycle getLifeCycle() { if (lifeCycle == null) { lifeCycle = component.getLifeCycle(); } return lifeCycle; }
public ServiceUnitManager getServiceUnitManager() { if (suManager == null) { suManager = component.getServiceUnitManager(); } return suManager; }
public Document getServiceDescription(ServiceEndpoint endpoint) { return component.getServiceDescription(endpoint); }
public boolean evaluate(ServiceEndpoint endpoint, MessageExchange exchange) { return component.isExchangeWithProviderOkay(endpoint, exchange); } }
/** * 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()]); }
public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) { return component.resolveEndpointReference(epr); }
public boolean evaluate(ServiceEndpoint endpoint, MessageExchange exchange) { return component.isExchangeWithConsumerOkay(endpoint, exchange); } }
public boolean isExchangeWithProviderOkay(ServiceEndpoint endpoint, MessageExchange exchange) { return component.isExchangeWithProviderOkay(endpoint, exchange); }
exchange.beforeCapabilityCheck(endpoint); if (consumer.isExchangeWithProviderOkay(endpoint, exchange) && provider.isExchangeWithConsumerOkay(endpoint, exchange)) { match = endpoint; break;
DynamicEndpoint resolveEndpointReference(org.w3c.dom.DocumentFragment reference) { Set channels; DynamicEndpoint dep = null; channels = ((Hashtable)mChannels.clone()).keySet(); for (String id : ((Hashtable<String,DeliveryChannelImpl>)mChannels.clone()).keySet()) { Component comp = mComponentManager.getComponentInstance(id); ServiceEndpoint ep = comp.resolveEndpointReference(reference); if (ep != null) { dep = new DynamicEndpoint(ep, id, reference); break; } } return dep; }
public boolean isExchangeWithConsumerOkay(ServiceEndpoint endpoint, MessageExchange exchange) { return component.isExchangeWithConsumerOkay(endpoint, exchange); }
public ServiceUnitManager getServiceUnitManager() { return component.getServiceUnitManager(); }
public ComponentLifeCycle getLifeCycle() { if (lifeCycle == null) { lifeCycle = component.getLifeCycle(); } return this; }
public Document getServiceDescription(String componentName, ServiceEndpoint endpoint) throws PetalsException { this.log.start(); Installer installer = this.installersByName.get(componentName); if (installer == null) { throw new PetalsException("Cannot find a component '" + componentName + "' in the container"); } Document doc = installer.getComponent().getServiceDescription(endpoint); this.log.end(); return doc; }
public boolean isExchangeWithProviderOkayForComponent(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().isExchangeWithProviderOkay(internalEndpoint, exchange); this.log.end(); return result; }
public ServiceEndpoint resolveEndpointReference(DocumentFragment epr) { this.logger.start(); ParameterCheckHelper.isNullParameter(epr, "epr"); javax.jbi.servicedesc.ServiceEndpoint result = null; // switch the classloader to the container one ClassLoader componentClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); try { for (Installer installer : this.componentContextCommunication.getAdminService() .getInstallers()) { result = installer.getComponent().resolveEndpointReference(epr); if (result != null) { break; } } } finally { Thread.currentThread().setContextClassLoader(componentClassLoader); } this.logger.end(); return result; }
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; }
/** * Get the ServiceUnitManager instance for this component, if one is * available. * @return the Service Unit Manager or null if there is none. */ public javax.jbi.component.ServiceUnitManager getServiceUnitManager() { if ( null == mSUManagerInstance ) { if ( null != mComponentInstance ) { mSUManagerInstance = mComponentInstance.getServiceUnitManager(); } } return mSUManagerInstance; }
/** * Set the class instance of the Component implementation for this BC or SE. * @param classInstance The Component class instance. */ public void setComponentInstance(javax.jbi.component.Component classInstance) { if ( null != classInstance ) { mComponentInstance = classInstance; mLifeCycleInstance = classInstance.getLifeCycle(); } }
Document doc = component.getComponent().getServiceDescription(externalEndpoint); if (doc != null) { String data = DOMUtil.asXML(doc);