Examples of UDPTransportService


Examples of org.wso2.carbon.transport.udp.UDPTransportService

    public UDPTransportServiceComponent() {
    }

    protected void activate(ComponentContext ctxt) {
        ConfigurationContext configContext;
        UDPTransportService udpTransport;
        Properties props;
        log.debug("******* UDP 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.udp bundle");
            }
            BundleContext bundleCtx = ctxt.getBundleContext();

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

            // Instantiate UDPTransportService
            udpTransport = new UDPTransportService();

            // This should ideally contain properties of FIXTransportService 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.