Package org.eclipse.osgi.framework.log

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


      try {
        return ((Boolean) hostsEqualMethod.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, "hostsEqual", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here


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

      try {
        return ((Boolean) sameFileMethod.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, "sameFile", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here

        setURLMethod.invoke(handler, new Object[] {arg0, arg1, arg2, new Integer(arg3), arg4, arg5, arg6, arg7, arg8});
        return;
      } catch (InvocationTargetException e) {
        throw (RuntimeException) e.getTargetException();
      } catch (Exception e) {
        factory.adaptor.getFrameworkLog().log(new FrameworkLogEntry(MultiplexingURLStreamHandler.class.getName(), FrameworkLogEntry.ERROR, 0, "setURL", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here

      try {
        return (String) toExternalFormMethod.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, "toExternalForm", 0, e, null)); //$NON-NLS-1$
        throw new RuntimeException(e.getMessage(), e);
      }
    }
    throw new IllegalStateException();
  }
View Full Code Here

      // if parent is present do parent lookup
      if (result == null && parentFactory != null)
        result = parentFactory.createURLStreamHandler(protocol);
      return result; //result may be null; let the VM handle it (consider sun.net.protocol.www.*)
    } catch (Throwable t) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(StreamHandlerFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "Unexpected error in factory.", 0, t, null)); //$NON-NLS-1$
      return null;
    } finally {
      releaseRecursive(protocol);
    }
  }
View Full Code Here

        Object prop = serviceReferences[i].getProperty(URLConstants.URL_HANDLER_PROTOCOL);
        if (prop instanceof String)
          prop = new String[] {(String) prop}; // TODO should this be a warning?
        if (!(prop instanceof String[])) {
          String message = NLS.bind(Msg.URL_HANDLER_INCORRECT_TYPE, new Object[] {URLConstants.URL_HANDLER_PROTOCOL, URLSTREAMHANDLERCLASS, serviceReferences[i].getBundle()});
          adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.WARNING, 0, message, 0, null, null));
          continue;
        }
        String[] protocols = (String[]) prop;
        for (int j = 0; j < protocols.length; j++)
          if (protocols[j].equals(protocol)) {
View Full Code Here

    try {
      Method createInternalURLStreamHandlerMethod = factory.getClass().getMethod("createInternalURLStreamHandler", new Class[] {String.class}); //$NON-NLS-1$
      return (URLStreamHandler) createInternalURLStreamHandlerMethod.invoke(factory, new Object[] {protocol});
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(StreamHandlerFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "findAuthorizedURLStreamHandler-loop", 0, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

    if (SignedBundleHook.ADAPTOR == null) {
      System.err.println(msg);
      t.printStackTrace();
      return;
    }
    FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, severity, 0, msg, 0, t, null);
    SignedBundleHook.ADAPTOR.getFrameworkLog().log(entry);
  }
View Full Code Here

   */
  static void log(int severity, String message, Exception e) {
    if (severity == SEVERITY_WARNING && ignoreWarnings)
      return; // ignoring warnings; bug 292980
    if (frameworkLog != null) {
      frameworkLog.log(new FrameworkLogEntry("org.eclipse.osgi", severity, 1, message, 0, e, null)); //$NON-NLS-1$
      return;
    }
    String statusMsg;
    switch (severity) {
      case SEVERITY_ERROR :
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.