Package org.apache.synapse.endpoints.algorithms

Examples of org.apache.synapse.endpoints.algorithms.AlgorithmContext


        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
            }

            // Initialize the SAL Sessions if already has not been initialized.
            SALSessions salSessions = SALSessions.getInstance();
            if (!salSessions.isInitialized()) {
View Full Code Here


        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
            }

            // if the loadbalancing algorithm implements the ManagedLifecycle interface
            // initlize the algorithm
            if (algorithm != null && algorithm instanceof ManagedLifecycle) {
View Full Code Here

        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
            }

            // Initialize the SAL Sessions if already has not been initialized.
            SALSessions salSessions = SALSessions.getInstance();
            if (!salSessions.isInitialized()) {
View Full Code Here

        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
            }

            // if the loadbalancing algorithm implements the ManagedLifecycle interface
            // initlize the algorithm
            if (algorithm != null && algorithm instanceof ManagedLifecycle) {
View Full Code Here

                                               LoadbalanceAlgorithm algorithm,
                                               ConfigurationContext configCtx,
                                               boolean isClusteringEnabled,
                                               String endpointName) {
        for (Map.Entry<String, String> entry : hostDomainMap.entrySet()) {
            AlgorithmContext algorithmContext =
                new AlgorithmContext(isClusteringEnabled, configCtx, endpointName + "." + entry.getKey());
            this.hostDomainAlgorithmContextMap.put(entry.getKey(),
                                   new DomainAlgorithmContext(entry.getValue(), algorithm.clone(), algorithmContext));
        }
    }
View Full Code Here

                    "file for the domain " + lbDomain + " for host " + host;
            log.error(msg);
            throw new SynapseException(msg);
        }
        algorithm.setApplicationMembers(groupMgtAgent.getMembers());
        AlgorithmContext context = domainAlgorithmContext.getAlgorithmContext();
        return algorithm.getNextApplicationMember(context);
    }
View Full Code Here

        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
            }

            // Initialize the SAL Sessions if already has not been initialized.
            SALSessions salSessions = SALSessions.getInstance();
            if (!salSessions.isInitialized()) {
View Full Code Here

        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
            }

            // Initialize the SAL Sessions if already has not been initialized.
            SALSessions salSessions = SALSessions.getInstance();
            if (!salSessions.isInitialized()) {
View Full Code Here

     */
    public void addHostContext(HostContext host){
       
        String hostName = host.getHostName();

        AlgorithmContext algorithmContext =
                                            new AlgorithmContext(isClusteringEnabled,
                                                                 configCtx, endpointName + "." +
                                                                            hostName);

        host.setAlgorithm(lbAlgo.clone());
        host.setAlgorithmContext(algorithmContext);
View Full Code Here

                        +  tenantDomain;
            log.error(msg);
            throw new SynapseException(msg);
        }
        algorithm.setApplicationMembers(groupMgtAgent.getMembers());
        AlgorithmContext context = hostContext.getAlgorithmContext();
        return algorithm.getNextApplicationMember(context);
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.endpoints.algorithms.AlgorithmContext

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.