Package org.openxri.proxy

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


    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

      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

      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

    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

    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

      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

      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

      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

    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

TOP

Related Classes of org.openxri.proxy.ProxyException

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.