Package flex.messaging.config

Examples of flex.messaging.config.ClusterSettings


        List channelIds = destination.getChannels();

        if (clusterId == null)
            clusterId = getDefaultClusterId();

        ClusterSettings cls = (ClusterSettings) clusterSettings.get(clusterId);
       
        if (cls == null)
        {
            ClusterException ce = new ClusterException();
            ce.setMessage(10217, new Object[] {destination.getId(), clusterId});
            throw ce;
        }
       
        for (Iterator iter=channelIds.iterator(); iter.hasNext();)
        {
            String channelId = (String)iter.next();               
            Endpoint endpoint = broker.getEndpoint(channelId);                                     
            String endpointUrl = endpoint.getUrl();
            int endpointPort = endpoint.getPort();

            // This is only an error if we are using client side url-based load balancing.  If
            // there is a HW load balancer, then we can assume the server.name served up by the
            // SWF can be used to access the cluster members.  With client side load balancing,
            // the clients need the direct URLs of all of the servers.
            if (cls.getURLLoadBalancing())
            {
                // Ensure that the endpoint URI does not contain any replacement tokens.
                int tokenStart = endpointUrl.indexOf("{");
                if (tokenStart != -1)
                {
View Full Code Here


    private Cluster createCluster(String clusterId, String serviceType, String destinationName)
    {
        String destKey = Cluster.getClusterDestinationKey(serviceType, destinationName);
        Element propsFile = (Element) clusterConfig.get(clusterId);
        ClusterSettings cls = (ClusterSettings) clusterSettings.get(clusterId);
        Cluster cluster = null;
        Class clusterClass = ClassUtil.createClass(cls.getImplementationClass());
        Constructor clusterConstructor = null;
        try
        {
            clusterConstructor = clusterClass.getConstructor(new Class[] {ClusterManager.class, String.class, Element.class});
        }
        catch (Exception e)
        {
            ClusterException cx = new ClusterException();
            cx.setMessage(10210);
            cx.setRootCause(e);
            throw cx;
        }
        try
        {
            cluster = (Cluster)clusterConstructor.newInstance(new Object[] {this, clusterId, propsFile});
            cluster.setURLLoadBalancing(cls.getURLLoadBalancing());
        }
        catch (Exception e)
        {
            ClusterException cx = new ClusterException();
            cx.setMessage(10211);
View Full Code Here

        List channelIds = destination.getChannels();

        if (clusterId == null)
            clusterId = getDefaultClusterId();

        ClusterSettings cls = (ClusterSettings) clusterSettings.get(clusterId);
       
        if (cls == null)
        {
            ClusterException ce = new ClusterException();
            ce.setMessage(10217, new Object[] {destination.getId(), clusterId});
            throw ce;
        }
       
        for (Iterator iter=channelIds.iterator(); iter.hasNext();)
        {
            String channelId = (String)iter.next();               
            Endpoint endpoint = broker.getEndpoint(channelId);                                     
            String endpointUrl = endpoint.getUrl();
            int endpointPort = endpoint.getPort();

            // This is only an error if we are using client side url-based load balancing.  If
            // there is a HW load balancer, then we can assume the server.name served up by the
            // SWF can be used to access the cluster members.  With client side load balancing,
            // the clients need the direct URLs of all of the servers.
            if (cls.getURLLoadBalancing())
            {
                // Ensure that the endpoint URI does not contain any replacement tokens.
                int tokenStart = endpointUrl.indexOf("{");
                if (tokenStart != -1)
                {
View Full Code Here

    private Cluster createCluster(String clusterId, String serviceType, String destinationName)
    {
        String destKey = Cluster.getClusterDestinationKey(serviceType, destinationName);
        Element propsFile = (Element) clusterConfig.get(clusterId);
        ClusterSettings cls = (ClusterSettings) clusterSettings.get(clusterId);
        Cluster cluster = null;
        Class clusterClass = ClassUtil.createClass(cls.getImplementationClass());
        Constructor clusterConstructor = null;
        try
        {
            clusterConstructor = clusterClass.getConstructor(new Class[] {ClusterManager.class, String.class, Element.class});
        }
        catch (Exception e)
        {
            ClusterException cx = new ClusterException();
            cx.setMessage(10210);
            cx.setRootCause(e);
            throw cx;
        }
        try
        {
            cluster = (Cluster)clusterConstructor.newInstance(new Object[] {this, clusterId, propsFile});
            cluster.setURLLoadBalancing(cls.getURLLoadBalancing());
        }
        catch (Exception e)
        {
            ClusterException cx = new ClusterException();
            cx.setMessage(10211);
View Full Code Here

TOP

Related Classes of flex.messaging.config.ClusterSettings

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.