Package org.apache.servicemix.common

Examples of org.apache.servicemix.common.ServiceUnit


                              String serviceUnitRootPath) throws DeploymentException {
        File[] wsdls = new File(serviceUnitRootPath).listFiles(filter);
        if (wsdls == null || wsdls.length == 0) {
            throw failure("deploy", "No wsdl found", null);
        }
        ServiceUnit su = createServiceUnit();
        su.setComponent(component);
        su.setName(serviceUnitName);
        su.setRootPath(serviceUnitRootPath);
        for (int i = 0; i < wsdls.length; i++) {
            initFromWsdl(su, wsdls[i]);
        }
        if (su.getEndpoints().size() == 0) {
            throw failure("deploy", "Invalid wsdl: no endpoints found", null);
        }
        return su;
    }
View Full Code Here


    protected void registerExtensions(ExtensionRegistry registry) {
        JbiExtension.register(registry);
    }

    protected ServiceUnit createServiceUnit() {
        return new ServiceUnit();
    }
View Full Code Here

  private ServiceUnit serviceUnit;
 
  public WSNLifeCycle(BaseComponent component) {
    super(component);
    configuration = new WSNConfiguration();
    serviceUnit = new ServiceUnit();
    serviceUnit.setComponent(component);
  }
View Full Code Here

                              String serviceUnitRootPath) throws DeploymentException {
        File[] wsdls = new File(serviceUnitRootPath).listFiles(filter);
        if (wsdls == null || wsdls.length == 0) {
            throw failure("deploy", "No wsdl found", null);
        }
        ServiceUnit su = createServiceUnit();
        su.setComponent(component);
        su.setName(serviceUnitName);
        su.setRootPath(serviceUnitRootPath);
        for (int i = 0; i < wsdls.length; i++) {
            initFromWsdl(su, wsdls[i]);
        }
        if (su.getEndpoints().size() == 0) {
            throw failure("deploy", "Invalid wsdl: no endpoints found", null);
        }
        return su;
    }
View Full Code Here

    protected void registerExtensions(ExtensionRegistry registry) {
        JbiExtension.register(registry);
    }

    protected ServiceUnit createServiceUnit() {
        return new ServiceUnit();
    }
View Full Code Here

   
    protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
        // We receive an exchange for an EPR that has not been used yet.
        // Register a provider endpoint and restart processing.
        HttpEndpoint httpEp = new HttpEndpoint();
        httpEp.setServiceUnit(new ServiceUnit(component));
        httpEp.setService(ep.getServiceName());
        httpEp.setEndpoint(ep.getEndpointName());
        httpEp.setRole(MessageExchange.Role.PROVIDER);
        URI uri = new URI(ep.getEndpointName());
        Map map = URISupport.parseQuery(uri.getQuery());
View Full Code Here

   
    protected Endpoint getResolvedEPR(ServiceEndpoint ep) throws Exception {
        // We receive an exchange for an EPR that has not been used yet.
        // Register a provider endpoint and restart processing.
        JmsEndpoint jmsEp = new JmsEndpoint();
        jmsEp.setServiceUnit(new ServiceUnit(component));
        jmsEp.setService(ep.getServiceName());
        jmsEp.setEndpoint(ep.getEndpointName());
        jmsEp.setRole(MessageExchange.Role.PROVIDER);
        URI uri = new URI(ep.getEndpointName());
        Map map = URISupport.parseQuery(uri.getQuery());
View Full Code Here

        /* (non-Javadoc)
         * @see org.servicemix.common.BaseLifeCycle#doInit()
         */
        protected void doInit() throws Exception {
            super.doInit();
            su = new ServiceUnit();
            su.setComponent(HttpSpringComponent.this);
            if (endpoints != null) {
              for (int i = 0; i < endpoints.length; i++) {
                  endpoints[i].setServiceUnit(su);
                  su.addEndpoint(endpoints[i]);
View Full Code Here

        /* (non-Javadoc)
         * @see org.servicemix.common.BaseLifeCycle#doInit()
         */
        protected void doInit() throws Exception {
            super.doInit();
            su = new ServiceUnit();
            su.setComponent(JmsSpringComponent.this);
            if (endpoints != null) {
                for (int i = 0; i < endpoints.length; i++) {
                    endpoints[i].setServiceUnit(su);
                    su.addEndpoint(endpoints[i]);
View Full Code Here

       
    }
   
    public void testDeployWithProperties() throws Exception {
        MyXBeanDeployer deployer = new MyXBeanDeployer(new BaseComponent() { });
        ServiceUnit su = deployer.deploy("xbean", getServiceUnitPath("xbean"));
        assertNotNull(su);
        assertEquals(1, su.getEndpoints().size());
        XBeanEndpoint ep = (XBeanEndpoint) su.getEndpoints().iterator().next();
        assertEquals("value", ep.getProp());
    }
View Full Code Here

TOP

Related Classes of org.apache.servicemix.common.ServiceUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.