Package org.eclipse.osgi.framework.log

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry


    try {
      Class<?> clazz = factory.getClass();
      Method setParentFactory = clazz.getMethod("setParentFactory", new Class[] {Object.class}); //$NON-NLS-1$
      setParentFactory.invoke(factory, new Object[] {getParentFactory()});
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "register", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
    addFactory(factory);
  }
View Full Code Here


      // this is brittle; if class does not directly extend MultplexingFactory then this method will not exist, but we do not want a public method here
      Method closeTracker = factory.getClass().getSuperclass().getDeclaredMethod("closePackageAdminTracker", (Class[]) null); //$NON-NLS-1$
      closeTracker.setAccessible(true); // its a private method
      closeTracker.invoke(factory, (Object[]) null);
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "unregister", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

      Method register = clazz.getMethod("register", new Class[] {Object.class}); //$NON-NLS-1$   
      for (Object r : released) {
        register.invoke(successor, new Object[] {r});
      }
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "designateSuccessor", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
    closePackageAdminTracker(); // close tracker
    return successor;
  }
View Full Code Here

          Method hasAuthorityMethod = factory.getClass().getMethod("hasAuthority", new Class[] {Class.class}); //$NON-NLS-1$
          if (((Boolean) hasAuthorityMethod.invoke(factory, new Object[] {clazz})).booleanValue()) {
            return factory;
          }
        } catch (Exception e) {
          adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "findAuthorizedURLStreamHandler-loop", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
          throw new RuntimeException(e.getMessage(), e);
        }
      }
    }
    return null;
View Full Code Here

        if (handlerField == null)
          throw e;
      }
      handlerField.setAccessible(true);
    } catch (Exception e) {
      factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), FrameworkLogEntry.ERROR, 0, "initializeMethods", 0, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
    methodsInitialized = true;
  }
View Full Code Here

      } catch (InvocationTargetException e) {
        if (e.getTargetException() instanceof IOException)
          throw (IOException) e.getTargetException();
        throw (RuntimeException) e.getTargetException();
      } catch (Exception e) {
        factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), FrameworkLogEntry.ERROR, 0, "openConnection", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new MalformedURLException();
  }
View Full Code Here

      try {
        return ((Boolean) equalsMethod.invoke(handler, new Object[] {url1, url2})).booleanValue();
      } catch (InvocationTargetException e) {
        throw (RuntimeException) e.getTargetException();
      } catch (Exception e) {
        factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), FrameworkLogEntry.ERROR, 0, "equals", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here

      try {
        return ((Integer) getDefaultPortMethod.invoke(handler, (Object[]) null)).intValue();
      } catch (InvocationTargetException e) {
        throw (RuntimeException) e.getTargetException();
      } catch (Exception e) {
        factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), FrameworkLogEntry.ERROR, 0, "getDefaultPort", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here

      try {
        return (InetAddress) getHostAddressMethod.invoke(handler, new Object[] {url});
      } catch (InvocationTargetException e) {
        throw (RuntimeException) e.getTargetException();
      } catch (Exception e) {
        factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), FrameworkLogEntry.ERROR, 0, "hashCode", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here

      try {
        return ((Integer) hashCodeMethod.invoke(handler, new Object[] {url})).intValue();
      } catch (InvocationTargetException e) {
        throw (RuntimeException) e.getTargetException();
      } catch (Exception e) {
        factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), FrameworkLogEntry.ERROR, 0, "hashCode", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.framework.log.FrameworkLogEntry

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.