Examples of ConfigurationContextService


Examples of org.wso2.carbon.utils.ConfigurationContextService

        } catch (Exception ignored) {
        }

        // HTTPS port
        String mgtConsoleTransport = CarbonUtils.getManagementTransport();
        ConfigurationContextService configContextService = CarbonUIServiceComponent
            .getConfigurationContextService();
        int httpsPort = CarbonUtils.getTransportPort(configContextService, mgtConsoleTransport);
        int httpsProxyPort =
            CarbonUtils.getTransportProxyPort(configContextService.getServerConfigContext(),
                                              mgtConsoleTransport);

        // Context
        String context = request.getContextPath();
        if ("/".equals(context)) {
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

        } catch (Exception ignored) {
        }

        // HTTPS port
        String mgtConsoleTransport = CarbonUtils.getManagementTransport();
        ConfigurationContextService configContextService = CarbonUIServiceComponent
            .getConfigurationContextService();
        int httpsPort = CarbonUtils.getTransportPort(configContextService, mgtConsoleTransport);
        int httpsProxyPort =
            CarbonUtils.getTransportProxyPort(configContextService.getServerConfigContext(),
                                              mgtConsoleTransport);
        // Context
        if ("/".equals(context)) {
            context = "";
        }
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

      return null;
    }

    private int getTransportPort() {
      ConfigurationContextService configurationContextService = ServerRegistrationComponent
          .getConfigurationContextService();
      return CarbonUtils.getTransportPort(configurationContextService,
          "https");
    }
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

        } catch (SocketException e) {
            throw new UsageException("Error getting host name for the registry usage event payload",
                    e);
        }

        ConfigurationContextService configurationContextService = PublisherUtils.
                getConfigurationContextService();
        ConfigurationContext configurationContext;
        if (configurationContextService != null) {
            configurationContext = configurationContextService.getServerConfigContext();
        } else {
            throw new UsageException("ConfigurationContext is null");
        }
//        int port = CarbonUtils.getTransportPort(configurationContext, "https");
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

    public static UserRegistry getSuperTenantGovernanceSystemRegistry() throws RegistryException {
        return registryService.getGovernanceSystemRegistry();
    }

    public static void registerRetrieverServices(BundleContext bundleContext) throws Exception {
        ConfigurationContextService confCtxSvc = Util.getConfigurationContextService();

        // creating and registering tenant and user usage retrievers
        tenantUsageRetriever = new TenantUsageRetriever(
                registryService, confCtxSvc.getClientConfigContext());
        bundleContext.registerService(
                TenantUsageRetriever.class.getName(), tenantUsageRetriever, null);
    }
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

            hostName = NetworkUtils.getLocalHostname();
        } catch (SocketException e) {
            throw new MediationPublisherException("Error getting host name for the BAM event payload", e);
        }

        ConfigurationContextService confContextService = PublisherUtils.getConfigurationContextService();
        int port = CarbonUtils.getTransportPort(confContextService.getServerConfigContext(), "https");
        String baseServerUrl = TRANSPORT + "://" + hostName + ":" + port;
        ConfigurationContext configurationContext = confContextService.getServerConfigContext();
        String context = configurationContext.getContextRoot();
        SuperTenantCarbonContext tenantCarbonContext = SuperTenantCarbonContext.getCurrentContext(axisConfiguration);
        String tenantDomain = null;
        if (tenantCarbonContext != null) {
            tenantDomain = tenantCarbonContext.getTenantDomain();
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

            // reset private variables if readyState equals 4
            // readyState equals 4 means this object has been used earlier for an invocation.
            wsRequest.reset();
        }
        try {
            ConfigurationContextService service =
                    WSRequestServiceComponent.getConfigurationContextService();
            wsRequest.sender = new ServiceClient(service.getClientConfigContext(), null);
        } catch (AxisFault axisFault) {
            log.error("Error creating ServiceClient for WSRequest Hostobject", axisFault);
            throw new CarbonException(axisFault);
        }
        // Setting the cookie policy here
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

                        BrokerConfiguration brokerConfiguration)
            throws BrokerEventProcessingException {

        try {
            Map<String, String> properties = brokerConfiguration.getProperties();
            ConfigurationContextService configurationContextService =
                BrokerServiceValueHolder.getConfigurationContextService();
            BrokerClient brokerClient =
                    new BrokerClient(configurationContextService.getClientConfigContext(),
                                     properties.get(BrokerConstants.BROKER_CONF_WS_PROP_URI),
                                     properties.get(BrokerConstants.BROKER_CONF_WS_PROP_USERNAME),
                                     properties.get(BrokerConstants.BROKER_CONF_WS_PROP_PASSWORD));
            brokerClient.publish(topicName, message);
        } catch (AuthenticationExceptionException e) {
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

        Util.setRegistryService(null);
    }


    public static void registerRetrieverServices(BundleContext bundleContext) throws Exception {
        ConfigurationContextService confCtxSvc = Util.getConfigurationContextService();
    }
View Full Code Here

Examples of org.wso2.carbon.utils.ConfigurationContextService

    public static UserRegistry getSuperTenantGovernanceSystemRegistry() throws RegistryException {
        return registryService.getGovernanceSystemRegistry();
    }

    public static void registerRetrieverServices(BundleContext bundleContext) throws Exception {
        ConfigurationContextService confCtxSvc = Util.getConfigurationContextService();

        // creating and registering tenant and user usage retrievers
        tenantUsageRetriever = new TenantUsageRetriever(
                registryService, confCtxSvc.getServerConfigContext());
        bundleContext.registerService(
                TenantUsageRetriever.class.getName(), tenantUsageRetriever, null);
    }
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.