« Return to Thread: Changes from 1.3.5 to 1.3.6

Re: Changes from 1.3.5 to 1.3.6

by Vin Baines :: Rate this Message:

| View in Thread

Sorry, forgot to attach the code!

Quoting Vin Baines <v.f.baines@...>:

> Hi,
>
> Just trying to compile against the new 1.3.6, and hit a couple of problems.
>
> The bigger one seems to be the change in AgentParameters:
>
> In .5:
> public ClassParameters      archClass = null;
> In .6:
> private List<ClassParameters> archClasses = new ArrayList<ClassParameters>();
>
> I'm not sure I quite understand the reasoning behind the change? Agents
> can now have multiple instances of ClassParameters?
>
> Previously the code was using a method to get a comma seperated list of
> agent names, whenever agParameter.archClass.getClassName() matched the
> name of the custom extension class of AgArch - I've attached the code
> snippit.
>
> I can see there are some new get methods.. but this just returns a list
> of strings, I can't think how to check if the class matches?
>
> Thanks!


for (AgentParameters agParameter : agParameters) {
        ClassParameters classPar = agParameter.archClass;
                         
        if (classPar != null) {
                try {
                        Class c = Class.forName(classPar.getClassName());
                        if (c.equals(TankAgArch.class)) {
                                if (agParameter.qty == 1) {
                                        String agName = agParameter.name;
                                        agsParam = (agsParam == null) ? agName : agsParam.concat(",").concat(agName);
                                        }
                                        else {
                                                for (int i = 1; i <= agParameter.qty; i++) {
                                                        String agName = agParameter.name.concat(String.valueOf(i));
                                            agsParam = (agsParam == null) ? agName : agsParam.concat(",").concat(agName);
                                    }
                                    }
                                        }
                                } catch (ClassNotFoundException e) {
                                        e.printStackTrace();
                                }
            }
        }
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
Jason-users mailing list
Jason-users@...
https://lists.sourceforge.net/lists/listinfo/jason-users

 « Return to Thread: Changes from 1.3.5 to 1.3.6