Examples of VFSTransportService


Examples of org.wso2.carbon.transport.vfs.VFSTransportService

    public VFSTransportServiceComponent() {
    }

    protected void activate(ComponentContext ctxt) {
        ConfigurationContext configContext;
        VFSTransportService vfsTransport;
        Properties props;

        log.debug("******* VFS Transport bundle is activated ******* ");

        try {
            if (contextService != null) {
                // Getting server's configContext instance
                configContext = contextService.getServerConfigContext();
            } else {
                throw new Exception("ConfigurationContext is not found while loading " +
                                                    "org.wso2.carbon.transport.vfs bundle");
            }
            BundleContext bundleCtx = ctxt.getBundleContext();

            // Save the transport configuration to the registry if not already done so
            URL configURL = bundleCtx.getBundle().getResource(VFSTransportService.TRANSPORT_CONF);
            new TransportPersistenceManager(configContext.getAxisConfiguration()).
                    saveTransportConfiguration(VFSTransportService.TRANSPORT_NAME, configURL);
            TransportAxis2ConfigurationContextObserver cfgCtxObserver =
                    new TransportAxis2ConfigurationContextObserver(VFSTransportService.TRANSPORT_NAME,
                                                                   configURL);
            bundleCtx.registerService(Axis2ConfigurationContextObserver.class.getName(),
                                      cfgCtxObserver, null);

            // Instantiate VFSTransportService.
            vfsTransport = new VFSTransportService();

            // This should ideally contain properties of VFSTransportService as a collection of
            // key/value pair. Here we do not require to add any elements.
            props = new Properties();

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.