Package org.objectweb.celtix.configuration

Examples of org.objectweb.celtix.configuration.Configuration


        return portConfiguration;
    }

    private Configuration createConfiguration(Configuration portCfg) {
        ConfigurationBuilder cb = ConfigurationBuilderFactory.getBuilder(null);
        Configuration cfg = cb.getConfiguration(HTTP_CLIENT_CONFIGURATION_URI,
                                                HTTP_CLIENT_CONFIGURATION_ID,
                                                portCfg);
        if (null == cfg) {
            cfg = cb.buildConfiguration(HTTP_CLIENT_CONFIGURATION_URI,
                                        HTTP_CLIENT_CONFIGURATION_ID,
                                        portCfg);
        }
        // register the additional provider
        if (null != port) {
            cfg.getProviders().add(new WsdlHttpConfigurationProvider(port, false));
        }
        return cfg;
    }
View Full Code Here


        }
    }  
   
    BeanName(Configuration conf) {
        StringBuffer buf = new StringBuffer();
        Configuration c = conf;
        while (null != c) {
            if (buf.length() > 0) {
                buf.insert(0, TIGHT_BINDING);
            }
            buf.insert(0, c.getId().toString());
            c = c.getParent();
        }
        name = buf.toString();
        normalisedName = name;
    }
View Full Code Here

    private Configuration createConfiguration(Bus b,
                                                  EndpointReferenceType ref,
                                                  boolean isServer) {
        ConfigurationBuilder cb = ConfigurationBuilderFactory.getBuilder(null);

        Configuration busConfiguration = b.getConfiguration();
        Configuration parent = null;

        String configURI;
        String configID;

        if (isServer) {
            configURI = JMSConstants.JMS_SERVER_CONFIGURATION_URI;
            configID = JMSConstants.JMS_SERVER_CONFIG_ID;
            parent = busConfiguration
            .getChild(JMSConstants.ENDPOINT_CONFIGURATION_URI,
                      EndpointReferenceUtils.getServiceName(ref).toString());
        } else {
            configURI = JMSConstants.JMS_CLIENT_CONFIGURATION_URI;
            configID = JMSConstants.JMS_CLIENT_CONFIG_ID;
            String id = EndpointReferenceUtils.getServiceName(ref).toString()
                + "/" + EndpointReferenceUtils.getPortName(ref);
            parent   = busConfiguration
            .getChild(JMSConstants.PORT_CONFIGURATION_URI, id);
        }

        assert null != parent;

        Configuration cfg = cb.getConfiguration(configURI, configID, parent);
        if (null == cfg) {
            cfg = cb.buildConfiguration(configURI,  configID, parent);
        }
        // register the additional provider
        if (null != port) {
            cfg.getProviders().add(new WsdlJMSConfigurationProvider(port, false));
        }
        return cfg;
    }
View Full Code Here

    }
    public ResourceManagerImpl(Bus bus) throws BusException {
        super();
        resolvers.clear();
       
        Configuration conf = bus.getConfiguration();
        assert null != conf;
        Object obj = conf.getObject("resourceResolvers");
        assert null != obj;
       
        try {
            for (String className : ((StringListType)obj).getItem()) {
                if (LOG.isLoggable(Level.FINE)) {
View Full Code Here

        if (parent == null && !isValidTopConfiguration(model, parent)) {
            throw new ConfigurationException(new Message("INVALID_TOP_CONFIGURATION",
                                                         BUNDLE, namespaceUri));
        }

        Configuration c = new CeltixConfigurationImpl(model, id, parent);
        if (null == parent) {
            Map<String, Configuration> instances = configurations.get(namespaceUri);
            if (null == instances) {
                instances = new HashMap<String, Configuration>();
                configurations.put(namespaceUri, instances);
View Full Code Here

    }

    private List<Handler> createHandlerChain(PortInfo portInfo) {

        List<Handler> chain = null;
        Configuration portConfiguration = null;
        String id = portInfo.getPortName().getLocalPart();
        if (service != null) {
            id = service.toString() + "/" + portInfo.getPortName().getLocalPart();
        }
        if (null != busConfiguration) {
            portConfiguration = busConfiguration
                .getChild(PORT_CONFIGURATION_URI, id);
        }
        if (null != portConfiguration) {
            HandlerChainBuilder builder = new HandlerChainBuilder();
            HandlerChainType hc = (HandlerChainType)portConfiguration.getObject("handlerChain");
            chain = builder.buildHandlerChainFromConfiguration(hc);
        }
        if (null == chain) {
            chain = new ArrayList<Handler>();
        }
View Full Code Here

        }

        EndpointReferenceType ref = EndpointReferenceUtils.getEndpointReference(wsdlLocation,
                serviceName, portName.getLocalPart());

        Configuration portConfiguration = createPortConfiguration(portName, ref);

        EndpointInvocationHandler endpointHandler =
                new EndpointInvocationHandler(bus, ref, this, portConfiguration, serviceEndpointInterface);

        createHandlerChainForBinding(serviceEndpointInterface, portName, endpointHandler.getBinding());
View Full Code Here

    //find the configuration for the port as a child of the bus configuration, or have
    //the builder create it if it does not exist yet
    private Configuration createPortConfiguration(QName portName, EndpointReferenceType ref) {

        Configuration portCfg = null;
        String id = serviceName.toString() + "/" + portName.getLocalPart();
        ConfigurationBuilder cb = ConfigurationBuilderFactory.getBuilder(null);
        portCfg = cb.getConfiguration(PORT_CONFIGURATION_URI, id,
                                      bus.getConfiguration());
        if (null == portCfg) {
            portCfg = cb.buildConfiguration(PORT_CONFIGURATION_URI, id, bus.getConfiguration());
        }

        // add the additional provider

        Port port = null;
        try  {
            port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), ref);
        } catch (WSDLException ex) {
            throw new WebServiceException("Could not get port from wsdl", ex);
        }
        portCfg.getProviders().add(new WsdlPortProvider(port));
        return portCfg;
    }
View Full Code Here

        }
    }
   
    private Configuration createConfiguration(Bus bus, int p) {
        // REVISIT: listener config should not be child of bus configuration
        Configuration busCfg = bus.getConfiguration();
        String id = "http-listener." + p;
        ConfigurationBuilder cb = ConfigurationBuilderFactory.getBuilder(null);
        Configuration cfg = cb.getConfiguration(HTTP_LISTENER_CONFIGURATION_URI, id, busCfg);
        if (null == cfg) {
            cfg = cb.buildConfiguration(HTTP_LISTENER_CONFIGURATION_URI, id, busCfg);
        }
        return cfg;
    }
View Full Code Here

   
    public void shutdown() {              
    }
   
    private Configuration createConfiguration(EndpointReferenceType ref) {
        Configuration busConfiguration = bus.getConfiguration();
        QName serviceName = EndpointReferenceUtils.getServiceName(ref);
        Configuration endpointConfiguration = busConfiguration
            .getChild(ENDPOINT_CONFIGURATION_URI, serviceName.toString());
        Port port = null;
        try {
            port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), ref);           
        } catch (WSDLException ex) {
            // ignore
        }
        ConfigurationBuilder cb = ConfigurationBuilderFactory.getBuilder(null);
 
        Configuration cfg = cb.getConfiguration(HTTP_SERVER_CONFIGURATION_URI,
                                                HTTP_SERVER_CONFIGURATION_ID,
                                                endpointConfiguration);
        if (null == cfg) {
            cfg = cb.buildConfiguration(HTTP_SERVER_CONFIGURATION_URI,
                                        HTTP_SERVER_CONFIGURATION_ID,
                                        endpointConfiguration);
        }
        // register the additional provider
        if (null != port) {
            cfg.getProviders().add(new WsdlHttpConfigurationProvider(port, true));
        }
        return cfg;
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.configuration.Configuration

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.