Examples of ProxyException


Examples of flex.messaging.services.http.proxy.ProxyException

        int i = url.indexOf("/..");
        while (i != -1)
        {
            if (i == (url.length() - 3) || url.charAt(i + 3) == '/')
            {
                throw new ProxyException(DOT_DOT_NOT_ALLOWED);
            }
            i = url.indexOf("/..", i + 1);
        }

        //Next, check if the URL is exactly the default URL
        url = url.toLowerCase();

        // In IPv6, update to long form, if required.
        url = SettingsReplaceUtil.updateIPv6(url);

        if (defaultUrl != null && defaultUrl.equalsIgnoreCase(url))
            return;

        char[] urlChars = url.toCharArray();

        // Next, check that the URL matches a dynamic URL pattern
        for (i = 0; i < dynamicUrls.size(); i++)
        {
            char[] pattern = (char[])dynamicUrls.get(i);
            boolean matches = StringUtils.findMatchWithWildcard(urlChars, pattern);

            if (matches)
            {
                if (!authSupplied || destination.allowsDynamicAuthentication())
                    return;
                throw new ProxyException(MULTIPLE_DOMAIN_PORT);
            }
        }

        ProxyException exception = new ProxyException();
        exception.setMessage
        (DYNAMIC_NOT_CONFIGURED, new Object[] {originalUrl, destination.getId()});
        throw exception;
    }
View Full Code Here

Examples of flex.messaging.services.http.proxy.ProxyException

        int i = url.indexOf("/..");
        while (i != -1)
        {
            if (i == (url.length() - 3) || url.charAt(i + 3) == '/')
            {
                throw new ProxyException(DOT_DOT_NOT_ALLOWED);
            }
            i = url.indexOf("/..", i + 1);
        }

        //Next, check if the URL is exactly the default URL
        url = url.toLowerCase();

        // In IPv6, update to long form, if required.
        url = SettingsReplaceUtil.updateIPv6(url);
       
        if (defaultUrl != null && defaultUrl.toLowerCase().equals(url))
        {
            return;
        }

        char[] urlChars = url.toCharArray();
       
        // Next, check that the URL matches a dynamic URL pattern      
        for (i = 0; i < dynamicUrls.size(); i++)
        {
            char[] pattern = (char[])dynamicUrls.get(i);
            boolean matches = StringUtils.findMatchWithWildcard(urlChars, pattern);

            if (matches)
            {
                if (!authSupplied || destination.allowsDynamicAuthentication())
                {
                    return;
                }
                else
                {
                    throw new ProxyException(MULTIPLE_DOMAIN_PORT);
                }
            }
        }

        ProxyException exception = new ProxyException();
        exception.setMessage
        (DYNAMIC_NOT_CONFIGURED, new Object[] {originalUrl, destination.getId()});
        throw exception;
    }
View Full Code Here

Examples of flex.messaging.services.http.proxy.ProxyException

        int i = url.indexOf("/..");
        while (i != -1)
        {
            if (i == (url.length() - 3) || url.charAt(i + 3) == '/')
            {
                throw new ProxyException(DOT_DOT_NOT_ALLOWED);
            }
            i = url.indexOf("/..", i + 1);
        }

        //Next, check if the URL is exactly the default URL
        url = url.toLowerCase();

        // In IPv6, update to long form, if required.
        url = SettingsReplaceUtil.updateIPv6(url);
       
        if (defaultUrl != null && defaultUrl.toLowerCase().equals(url))
        {
            return;
        }

        char[] urlChars = url.toCharArray();
       
        // Next, check that the URL matches a dynamic URL pattern      
        for (i = 0; i < dynamicUrls.size(); i++)
        {
            char[] pattern = (char[])dynamicUrls.get(i);
            boolean matches = StringUtils.findMatchWithWildcard(urlChars, pattern);

            if (matches)
            {
                if (!authSupplied || destination.allowsDynamicAuthentication())
                {
                    return;
                }
                else
                {
                    throw new ProxyException(MULTIPLE_DOMAIN_PORT);
                }
            }
        }

        ProxyException exception = new ProxyException();
        exception.setMessage
        (DYNAMIC_NOT_CONFIGURED, new Object[] {originalUrl, destination.getId()});
        throw exception;
    }
View Full Code Here

Examples of net.sf.gilead.exception.ProxyException

    //
      return proxyClass.toClass(superClass.getClassLoader(), superClass.getProtectionDomain());
    }
    catch(Exception ex)
    {
      throw new ProxyException("Proxy generation failure for " + superClass.getName(), ex);
    }
  }
View Full Code Here

Examples of net.sf.hibernate4gwt.exception.ProxyException

    //
      return proxyClass.toClass(clazz.getClassLoader());
    }
    catch(Exception ex)
    {
      throw new ProxyException("Proxy generation failure for " + clazz.getName(), ex);
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.ProxyException

    this.bob1 = bob1;
  }

  public void method(final boolean throwException) throws ProxyException {
    if (throwException) {
      throw new ProxyException();
    }
  }
View Full Code Here

Examples of org.openxri.proxy.ProxyException

      resolver.setAuthority("=", config.getEqualsAuthority());
      resolver.setAuthority("@", config.getAtAuthority());
      resolver.setAuthority("!", config.getBangAuthority());
    } catch (Exception ex) {

      throw new ProxyException("Cannot initialize Resolver. Check the =, @ and ! root authorities.", ex);
    }

    String[] supports = config.getSupportedResMediaTypes();
    if (supports != null) {
View Full Code Here

Examples of org.openxri.proxy.ProxyException

    try {
      this.resolver.setAuthority("=", this.config.getEqualsAuthority());
      this.resolver.setAuthority("@", this.config.getAtAuthority());
      this.resolver.setAuthority("!", this.config.getBangAuthority());
    } catch (Exception ex) {
      throw new ProxyException("Cannot initialize Resolver. Check the =, @ and ! root authorities.", ex);
    }

    String[] supports = this.config.getSupportedResMediaTypes();
    if (supports != null) {
      for (int i = 0; i < supports.length; i++) {
View Full Code Here

Examples of org.openxri.proxy.ProxyException

      implementationClass = (Class<? extends Component>) classLoader.loadClass(implementationName);
    } catch (ClassNotFoundException ex) {

      log.error("Proxy implementation not found: " + implementationName, ex);
      throw new ProxyException("Proxy implementation not found: " + implementationName, ex);
    }

    // instantiate proxy implementation

    try {

      Class<?>[] constructorArgs = new Class<?>[] { ProxyConfig.class };
      Constructor<?> constructor = implementationClass.getConstructor(constructorArgs);
      this.moProxy = (Proxy) constructor.newInstance(new Object[] { this.proxyConfig });
    } catch (NoSuchMethodException ex) {

      log.error("Proxy " + implementationName + " does not have a constructor that takes a ProxyConfig object.", ex);
      throw new ProxyException("Proxy " + implementationName + " does not have a constructor that takes a ProxyConfig object.", ex);
    } catch (InstantiationException ex) {

      log.error("Cannot instantiate proxy " + implementationName + ".", ex);
      throw new ProxyException("Cannot instantiate proxy " + implementationName + ".", ex);
    } catch (IllegalAccessException ex) {

      log.error("Illegal access to constructor of proxy " + implementationName + ".", ex);
      throw new ProxyException("Illegal access to constructor of proxy " + implementationName + ".", ex);
    } catch (InvocationTargetException ex) {

      log.error("Cannot invoke constructor of proxy " + implementationName + ".", ex);
      throw new ProxyException("Cannot invoke constructor of proxy " + implementationName + ".", ex);
    } catch (Exception ex) {

      log.error("Cannot construct proxy " + implementationName + ".", ex);
      throw new ProxyException("Cannot construct proxy " + implementationName + ".", ex);
    }

    // init proxy

    this.moProxy.init();
View Full Code Here

Examples of org.openxri.proxy.ProxyException

      implementationClass = (Class<? extends Component>) classLoader.loadClass(implementationName);
    } catch (ClassNotFoundException ex) {

      log.error("Proxy implementation not found: " + implementationName, ex);
      throw new ProxyException("Proxy implementation not found: " + implementationName, ex);
    }

    // instantiate proxy implementation

    try {

      Class<?>[] constructorArgs = new Class<?>[] { ProxyConfig.class };
      Constructor<?> constructor = implementationClass.getConstructor(constructorArgs);
      this.moProxy = (Proxy) constructor.newInstance(new Object[] { this.proxyConfig });
    } catch (NoSuchMethodException ex) {

      log.error("Proxy " + implementationName + " does not have a constructor that takes a ProxyConfig object.", ex);
      throw new ProxyException("Proxy " + implementationName + " does not have a constructor that takes a ProxyConfig object.", ex);
    } catch (InstantiationException ex) {

      log.error("Cannot instantiate proxy " + implementationName + ".", ex);
      throw new ProxyException("Cannot instantiate proxy " + implementationName + ".", ex);
    } catch (IllegalAccessException ex) {

      log.error("Illegal access to constructor of proxy " + implementationName + ".", ex);
      throw new ProxyException("Illegal access to constructor of proxy " + implementationName + ".", ex);
    } catch (InvocationTargetException ex) {

      log.error("Cannot invoke constructor of proxy " + implementationName + ".", ex);
      throw new ProxyException("Cannot invoke constructor of proxy " + implementationName + ".", ex);
    } catch (Exception ex) {

      log.error("Cannot construct proxy " + implementationName + ".", ex);
      throw new ProxyException("Cannot construct proxy " + implementationName + ".", ex);
    }

    // init proxy

    this.moProxy.init();
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.