Package org.cafesip.jiplet.config.jip

Examples of org.cafesip.jiplet.config.jip.InitParam


            String location = null;
            String location_param = null;
            Iterator iter = config.getInitParams().getInitParam().iterator();
            while (iter.hasNext() == true)
            {
                InitParam parm = (InitParam) iter.next();
                if (parm.getParamName().equals("stateful") == true)
                {
                    String v = parm.getParamValue();
                    if ((v.equals("true") == true) || (v.equals("yes") == true))
                    {
                        stateful = true;
                       
                        if (isDebugEnabled() == true)
                        {
                            debug("The ProxyJiplet is stateful.");
                        }
                    }
                    else if ((v.equals("false") == true)
                            || (v.equals("no") == true))
                    {
                        stateful = false;
                    }
                    else
                    {
                        throw new JipletException(
                                "The value for the init-param \"stateful\" is invalid");
                    }
                }
                else if (parm.getParamName().equals("addRecordRoute") == true)
                {
                    String v = parm.getParamValue();
                    if ((v.equals("true") == true) || (v.equals("yes") == true))
                    {
                        addRecordRoute = true;
                       
                        if (isDebugEnabled() == true)
                        {
                            debug("The ProxyJiplet will add record route parameter.");
                        }
                    }
                    else if ((v.equals("false") == true)
                            || (v.equals("no") == true))
                    {
                        addRecordRoute = false;
                    }
                    else
                    {
                        throw new JipletException(
                                "The value for the init-param \"addRecordRoute\" is invalid");
                    }
                }
                else if (parm.getParamName().equals("presenceServer") == true)
                {
                    String v = parm.getParamValue();
                    if ((v.equals("true") == true) || (v.equals("yes") == true))
                    {
                        presenceServer = true;
                       
                        if (isDebugEnabled() == true)
                        {
                            debug("The ProxyJiplet presenceServer setting = true.");
                        }
                    }
                    else if ((v.equals("false") == true)
                            || (v.equals("no") == true))
                    {
                        presenceServer = false;
                    }
                    else
                    {
                        throw new JipletException(
                                "The value for the init-param \"presenceServer\" is invalid");
                    }
                }
                else if (parm.getParamName().equals("locationRegister") == true)
                {
                    location = parm.getParamValue();
                }
                else if (parm.getParamName().equals("locationRegisterParam") == true)
                {
                    location_param = parm.getParamValue();
                }
                else if (parm.getParamName().equals("forwardLocation") == true)
                {
                    forward = parm.getParamValue();
                }
                else
                {
                    warn ("Unknown init-param " + parm.getParamName());
                }
            }

            if (location == null)
            {
View Full Code Here


            HashMap params = new HashMap();
            List paramlist = plist.getInitParam();
            Iterator i = paramlist.iterator();
            while (i.hasNext())
            {
                InitParam parm = (InitParam) i.next();
                params.put(parm.getParamName(), parm.getParamValue());
            }
            jiplet.setInitParams(params);
        }

        jiplet.setJipletContext(this);
View Full Code Here

        String url = null;
        String user = null;
        String password = null;
        while (iter.hasNext() == true)
        {
            InitParam parm = (InitParam) iter.next();

            if (parm.getParamName().equals("jdbcDriver") == true)
            {
                jdbc = parm.getParamValue();
            }
            else if (parm.getParamName().equals("dbUrl") == true)
            {
                url = parm.getParamValue();
            }
            else if (parm.getParamName().equals("dbUser") == true)
            {
                user = parm.getParamValue();
            }
            else if (parm.getParamName().equals("dbPassword") == true)
            {
                password = parm.getParamValue();
            }

            if (isDebugEnabled() == true)
            {
                debug("Init param (" + parm.getParamName() + ", "
                        + parm.getParamValue() + ")");
            }
        }

        // print the application scope variables. The purpose of the code
        // segment below
View Full Code Here

            InitParams init = config.getInitParams();
            Iterator iter = init.getInitParam().iterator();

            while (iter.hasNext() == true)
            {
                InitParam parm = (InitParam) iter.next();
                debug("Init param (" + parm.getParamName() + ", "
                        + parm.getParamValue() + ")");

                // save the variables in the application scope
                getJipletContext().setAttribute(parm.getParamName(),
                        parm.getParamValue());
            }
        }
       
        try
        {
View Full Code Here

TOP

Related Classes of org.cafesip.jiplet.config.jip.InitParam

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.