Package com.sun.enterprise.ee.admin.lbadmin.reader.api

Examples of com.sun.enterprise.ee.admin.lbadmin.reader.api.ClusterReader


    /**
     * Visit reader class
     */
    public void visit(BaseReader br) {
        // FIXME, make as assert here about no class cast exception
        ClusterReader cRdr = (ClusterReader) br;
        try {
            _c.setName(cRdr.getName());
            _c.setPolicy(cRdr.getLbPolicy());
            _c.setPolicyModule(cRdr.getLbPolicyModule());
        } catch (LbReaderException le) {
            // XXX ignore
        }
        InstanceReader[] iRdrs = null;
        try {
            iRdrs = cRdr.getInstances();
        } catch (LbReaderException le) {
            // XXX ignore
        }

        if ((iRdrs != null) &&  (iRdrs.length > 0 ) ){
            boolean[] values = new boolean[iRdrs.length];
            // XXX check if setting to true is required and is ok.
            for(int i=0; i < iRdrs.length; i++) {
                values[i] = true;
            }
            _c.setInstance(values);
            for(int i=0; i < iRdrs.length; i++) {
                iRdrs[i].accept(new InstanceVisitor(_c, i));
            }
        }

        HealthCheckerReader hcRdr = null;
        try {
             hcRdr = cRdr.getHealthChecker();
        } catch (LbReaderException le) {
            // XXX ignore
        }

        if (hcRdr != null) {
            hcRdr.accept(new HealthCheckerVisitor(_c));   
        }

        WebModuleReader[] wRdrs = null;
        try {
            wRdrs = cRdr.getWebModules();
        } catch (LbReaderException le) {
            // XXX ignore
        }

        if ((wRdrs != null) &&  (wRdrs.length > 0 ) ){
View Full Code Here


                        ((servers == null) || (servers.length == 0))) {
                return null;
        }
      
        int total = clusters.length + servers.length;
        ClusterReader clImpls = null;

        for (int i=0; i < clusters.length; i++) {
            clImpls = new ClusterReaderImpl(_ctx,_lbConfig.getClusterRef(i));
            list.add(clImpls);
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.admin.lbadmin.reader.api.ClusterReader

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.