Package org.apache.axis2.clustering.management

Examples of org.apache.axis2.clustering.management.GroupManagementAgent


        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new StartMaintenanceCommand());
    }

    public void endGroupMaintenance(String groupName) throws Exception {
        GroupManagementAgent groupManagementAgent = getGroupManagementAgent(groupName);
        groupManagementAgent.send(new EndMaintenanceCommand());
    }
View Full Code Here


    private void sendToCluster(GroupManagementCommand cmd) throws AxisFault {
        ClusteringAgent clusteringAgent = getClusteringAgent();
        Set<String> groupNames = clusteringAgent.getDomains();
        for (String groupName : groupNames) {
            GroupManagementAgent managementAgent =
                    clusteringAgent.getGroupManagementAgent(groupName);
            managementAgent.send(cmd);
        }
    }
View Full Code Here

        }
    }

    private GroupManagementAgent getGroupManagementAgent(String groupName) throws AxisFault {
        ClusteringAgent clusteringAgent = getClusteringAgent();
        GroupManagementAgent groupManagementAgent =
                clusteringAgent.getGroupManagementAgent(groupName);
        if (groupManagementAgent == null) {
            handleException("No GroupManagementAgent defined for domain " + groupName);
        }
        return groupManagementAgent;
View Full Code Here

                String descAttrib = omElement.getAttributeValue(new QName("description"));
                String description = "Description not found";
                if (descAttrib != null) {
                    description = descAttrib.trim();
                }
                GroupManagementAgent eventHandler;
                try {
                    eventHandler = (GroupManagementAgent) Class.forName(handlerClass).newInstance();
                    eventHandler.setDescription(description);
                } catch (Exception e) {
                    String msg = "Could not instantiate GroupManagementAgent " + handlerClass +
                                 " for domain " + domainName;
                    log.error(msg, e);
                    throw new DeploymentException(msg, e);
View Full Code Here

        // This is needed only when this member is running as a load balancer
        for (Object o : groupManagementAgents.keySet()) {
            String domain = (String) o;
            final MembershipManager membershipManager = new MembershipManager();
            membershipManager.setDomain(domain.getBytes());
            GroupManagementAgent groupMgtAgent = groupManagementAgents.get(domain);
            membershipManager.setGroupManagementAgent(groupMgtAgent);
            if(groupMgtAgent instanceof DefaultGroupManagementAgent) {
                ((DefaultGroupManagementAgent) groupMgtAgent).setMembershipManager(membershipManager);
            }
View Full Code Here

    }

    //----------------------- default method implementations and common code -----------------------

    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            // The check for clustering environment
            ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
            if (clusteringAgent != null && clusteringAgent.getStateManager() != null) {
                isClusteringEnabled = Boolean.TRUE;
            } else {
                isClusteringEnabled = Boolean.FALSE;
            }
View Full Code Here

     */
    private AlgorithmContext algorithmContext;

    @Override
    public void init(SynapseEnvironment synapseEnvironment) {
        ConfigurationContext cc =
                ((Axis2SynapseEnvironment) synapseEnvironment).getAxis2ConfigurationContext();
        if (!initialized) {
            super.init(synapseEnvironment);
            if (algorithmContext == null) {
                algorithmContext = new AlgorithmContext(isClusteringEnabled, cc, getName());
View Full Code Here

    }

    public void send(MessageContext synCtx) {
        SessionInformation sessionInformation = null;
        Member currentMember = null;
        ConfigurationContext configCtx =
                ((Axis2MessageContext) synCtx).getAxis2MessageContext().getConfigurationContext();
        if (lbMembershipHandler.getConfigurationContext() == null) {
            lbMembershipHandler.setConfigurationContext(configCtx);
        }
View Full Code Here

     */
    public static StatisticsCollector getStatisticsCollector(ServerContextInformation contextInfo) {
        if (contextInfo != null && contextInfo.getServerState() == ServerState.INITIALIZED) {
            Object o = contextInfo.getServerContext();
            if (o instanceof ConfigurationContext) {
                ConfigurationContext context = (ConfigurationContext) o;
                SynapseEnvironment environment =
                        (SynapseEnvironment) context.getAxisConfiguration().getParameterValue(
                                SynapseConstants.SYNAPSE_ENV);
                if (environment != null) {
                    return environment.getStatisticsCollector();
                }
            }
View Full Code Here

                    (preserveAddressingProperty != null &&
                            Boolean.parseBoolean(preserveAddressingProperty)));
        }


        ConfigurationContext axisCfgCtx = axisOutMsgCtx.getConfigurationContext();
        AxisConfiguration axisCfg       = axisCfgCtx.getAxisConfiguration();

        AxisService anoymousService =
            AnonymousServiceFactory.getAnonymousService(synapseOutMessageContext.getConfiguration(),
            axisCfg, wsAddressingEnabled, wsRMEnabled, wsSecurityEnabled);
        // mark the anon services created to be used in the client side of synapse as hidden
View Full Code Here

TOP

Related Classes of org.apache.axis2.clustering.management.GroupManagementAgent

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.