Examples of NamespaceException


Examples of org.osgi.service.http.NamespaceException

        if (length > 1 && alias.charAt(length - 1) == '/')
            throw new IllegalArgumentException(
                    "The alias parameter must not end with slash: " + alias);

        if (registrations.get(alias) != null)
            throw new NamespaceException("The alias is already in use: "
                    + alias);

        bundleRegistrations.addElement(alias);
        registrations.put(alias, registration);
View Full Code Here

Examples of org.osgi.service.http.NamespaceException

       
        synchronized (m_servletMap)
        {
            if (m_servletMap.containsKey(alias))
            {
                throw new NamespaceException("Alias " + alias
                    + " has already been registered.");
            }
        }

        if (context == null)
View Full Code Here

Examples of org.osgi.service.http.NamespaceException

    {
        validateAlias(alias);
       
        if (m_servletMap.containsKey(alias))
        {
            throw new NamespaceException("Alias " + alias
                + " has already been registered.");
        }

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

Examples of org.osgi.service.http.NamespaceException

     */
    private void validateAlias( String alias ) throws NamespaceException
    {
        if (alias == null)
        {
            throw new NamespaceException( "Alias is null." );
        }
       
        if (alias.trim().length() == 0)
        {
            throw new NamespaceException( "Alias is an empty string." );
        }
       
        if (!alias.startsWith( "/" ))
        {
            throw new NamespaceException( "Alias must begin with '/'." );
        }
    }
View Full Code Here

Examples of org.osgi.service.http.NamespaceException

        {
            // Remove it from the servletmap too
            servletMap.remove(handler.getServlet(), handler);

            handler.destroy();
            throw new NamespaceException("Servlet with alias '" + handler.getAlias() + "' already registered");
        }

        updateServletArray();
    }
View Full Code Here

Examples of org.osgi.service.http.NamespaceException

            throw new ServletException("Servlet instance already registered");
        }

        if (this.aliasMap.containsKey(handler.getAlias()))
        {
            throw new NamespaceException("Servlet with alias already registered");
        }

        handler.init();
        this.servletMap.put(handler.getServlet(), handler);
        this.aliasMap.put(handler.getAlias(), handler.getServlet());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.