Package org.cafesip.jiplet

Examples of org.cafesip.jiplet.JipletException


                    .getDialog(), true);
            Transaction firstTransaction = (Transaction) jdialog
                    .getAttribute("firstTransaction");
            if (firstTransaction == null)
            {
                throw new JipletException(
                        "ERROR, RequestForwarding Cancel, the first transaction"
                                + " for the  dialog is null");
            }

            if (firstTransaction instanceof ClientTransaction)
View Full Code Here


    {
        try
        {
            if (request == null)
            {
                throw new JipletException(
                        "The request cannot be proxied from a non-request event");
            }

            this.addRecordRoute = addRecordRoute;
            this.stateful = stateful;
View Full Code Here

    public void proxyResponse(boolean presenceServer) throws JipletException,
            SipException, ParseException
    {
        if (response == null)
        {
            throw new JipletException(
                    "The response cannot be proxied from a non-response event");
        }

        ResponseForwarding forwarder = new ResponseForwarding(jiplet,
                (SipProvider) response.getSource(), presenceServer);
View Full Code Here

    public void handleProxyTimeout(boolean stateful) throws ParseException,
            SipException, JipletException
    {
        if (timeout == null)
        {
            throw new JipletException(
                    "The timout cannot be handled from a non-timeout event");
        }

        if (stateful == false)
        {
View Full Code Here

            initUsers();
           
        }
        catch (Exception e)
        {
            throw new JipletException(e);
        }
    }
View Full Code Here

                JipletLogger.debug("For the realm " + name + ", the opaque value is " + opaque);
            }
        }
        catch (Exception e)
        {
            throw new JipletException(e);
        }
    }
View Full Code Here

                    {
                        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)
            {
                throw new JipletException(
                        "The location database has not been specified");
            }

            initLocationRegister(location, location_param);
        }
        catch (JipletException e)
        {
            throw e;
        }
        catch (Exception e)
        {
            throw new JipletException(e);
        }
    }
View Full Code Here

        super.init(name, rootDir, params, defaultRealm);
       
        driver = (String) params.get("jdbc-driver");
        if (driver == null)
        {
            throw new JipletException(
                    "No JDBC driver specified as realm parameter");
        }

        url = (String) params.get("jdbc-url");
        if (driver == null)
        {
            throw new JipletException(
                    "No JDBC URL specified as realm parameter");
        }

        String param = (String) params.get("jdbc-user");
        if (param != null)
        {
            user = param;
        }

        param = (String) params.get("jdbc-password");
        if (param != null)
        {
            password = param;
        }

        try
        {
            Class.forName(driver).newInstance();
            connection = DriverManager.getConnection(url, user, password);

            createTables();
        }
        catch (Exception e)
        {
            throw new JipletException(e);
        }
    }
View Full Code Here

                String jiplet = (String) i.next();

                Jiplet j = context.findJiplet(jiplet);
                if (j == null)
                {
                    throw new JipletException(
                            "While creating security constraint for collection "
                                    + constraint.getJipletResourceCollection()
                                            .getJipletResourceName()
                                    + " jiplet " + jiplet + " was not found");
                }

                synchronized (jipletMap)
                {
                    String rname = auth.getRealm();
                    if (rname == null)
                    {
                        rname = JipletContainer.getInstance().getDefaultRealm();
                    }

                    Realm realm = JipletContainer.getInstance()
                            .findRealm(rname);
                    if (realm == null)
                    {
                        throw new JipletException(
                                "While creating security constraint for collection "
                                        + constraint
                                                .getJipletResourceCollection()
                                                .getJipletResourceName()
                                        + " realm " + rname + " was not found");
View Full Code Here

        URL home_url = new URL(home);

        file = new File(home_url.getPath(), "deploy/jiplet-service.sar");
        if (file.exists() == false)
        {
            throw new JipletException("The jiplet SAR was not found");
        }

        // define the logger
        JBossLogger logger = new JBossLogger(log);
        JipletLogger.configLogger(logger);
               
        // define the config directory
        String jboss_conf = System.getProperty("jboss.server.config.url");
        URL conf_url = new URL(jboss_conf);
        File conf_dir = new File(conf_url.getPath(), "jiplet");
        if (conf_dir.exists() == false)
        {
            if (conf_dir.mkdir() == false)
            {
                throw new JipletException(
                        "Could not create configuration directory "
                                + conf_dir.getAbsolutePath());
            }
        }

        copyConfigFiles(file, conf_dir);
       
        JipletContainer.setConfDir(conf_dir);

        JipletContainer.setVendorDeploymentFactory(new JBossDeploymentDescriptorFactory());
       
        // define the deploy directory
        File deploy_dir = new File(home_url.getPath(), "jiplet-work");
        if (deploy_dir.exists() == false)
        {
            if (deploy_dir.mkdir() == false)
            {
                throw new JipletException ("Could not create jiplet deployment directory "
                        + deploy_dir.getAbsolutePath());
            }
        }
       
        FileUtils fu = new FileUtils();
View Full Code Here

TOP

Related Classes of org.cafesip.jiplet.JipletException

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.