Package org.wso2.carbon.utils

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


        } 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

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

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


    }
View Full Code Here

     * Returns the endpoint URL of the AutoCheckoutService
     *
     * @return a String URL or null of the service is not available
     */
    public static String getEventReceiverEndpoint() {
        ConfigurationContextService configurationContextService =
                ServiceReferenceHolder.getConfigurationContextService();
        if (configurationContextService == null) {
            throw new IllegalStateException("Configuration context service not available");
        }

        AxisConfiguration axisConfig = configurationContextService.getServerConfigContext().
                getAxisConfiguration();
        AxisService service;
        try {
            service = axisConfig.getService(DeploymentSynchronizerConstants.EVENT_RECEIVER_SERVICE);
        } catch (AxisFault axisFault) {
View Full Code Here

    protected ConfigurationContext getConfigContext() {

        // If a tenant has been set, then try to get the ConfigurationContext of that tenant
        PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
        ConfigurationContextService configurationContextService =
                (ConfigurationContextService) carbonContext.getOSGiService(ConfigurationContextService.class);
        ConfigurationContext mainConfigContext = configurationContextService.getServerConfigContext();
        String domain = carbonContext.getTenantDomain();
        if (domain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(domain)) {
            return TenantAxisUtils.getTenantConfigurationContext(domain, mainConfigContext);
        } else if (carbonContext.getTenantId() == MultitenantConstants.SUPER_TENANT_ID) {
            return mainConfigContext;
View Full Code Here

        } 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

        } 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

        return tenantPersistor;
    }

    public static ConfigurationContextService getConfigurationContext() {
        PrivilegedCarbonContext carbonContext = PrivilegedCarbonContext.getThreadLocalCarbonContext();
        ConfigurationContextService configurationContextService = (ConfigurationContextService) carbonContext.
                getOSGiService(ConfigurationContextService.class);
        return configurationContextService;
    }
View Full Code Here

        }

        public void run() {
            try {
                MessageContext msgCtx = ((Axis2MessageContext) synCtx).getAxis2MessageContext();
                Event<MessageContext> event = new Event(msgCtx);
                subscriptions = subscriptionManager.getMatchingSubscriptions(event);
            } catch (EventException e) {
                handleException("Matching subscriptions fetching error", e);
            }
View Full Code Here

     * @throws EventException event
     */
    private void processGetStatusRequest(MessageContext mc,
                                         ResponseMessageBuilder messageBuilder)
            throws AxisFault, EventException {
        Subscription subscription =
                SubscriptionMessageBuilder.createGetStatusMessage(mc);
        if (log.isDebugEnabled()) {
            log.debug("GetStatus request recived for SynapseSubscription ID : " +
                    subscription.getId());
        }
        subscription = subscriptionManager.getSubscription(subscription.getId());
        if (subscription != null) {
            if (log.isDebugEnabled()) {
                log.debug("Sending GetStatus responce for SynapseSubscription ID : " +
                        subscription.getId());
            }
            //send the responce
            SOAPEnvelope soapEnvelope = messageBuilder.genGetStatusResponse(subscription);
            dispatchResponse(soapEnvelope, EventingConstants.WSE_GET_STATUS_RESPONSE,
                    mc, false);
View Full Code Here

TOP

Related Classes of org.wso2.carbon.utils.ConfigurationContextService

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.