Examples of URLStreamHandlerFactory


Examples of java.net.URLStreamHandlerFactory

    {
      JRResourcesUtil.setThreadClassLoader(classLoader);
      context.setClassLoader(classLoader);
    }
   
    URLStreamHandlerFactory urlHandlerFactory = (URLStreamHandlerFactory)
        parameterValues.get(JRParameter.REPORT_URL_HANDLER_FACTORY);
    if (urlHandlerFactory != null)
    {
      JRResourcesUtil.setThreadURLHandlerFactory(urlHandlerFactory);
      context.setUrlHandlerFactory(urlHandlerFactory);
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

   * @return an URL stream handler if one was found for the protocol of the URL
   * @see #getURLHandlerFactory(URLStreamHandlerFactory)
   */
  public static URLStreamHandler getURLHandler(String spec, URLStreamHandlerFactory urlHandlerFact)
  {
    URLStreamHandlerFactory urlHandlerFactory = getURLHandlerFactory(urlHandlerFact);

    URLStreamHandler handler = null;
    if (urlHandlerFactory != null)
    {
      String protocol = getURLProtocol(spec);
      if (protocol != null)
      {
        handler = urlHandlerFactory.createURLStreamHandler(protocol);
      }
    }
    return handler;
  }
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

   * @see #setGlobalURLHandlerFactory(URLStreamHandlerFactory)
   * @see #setThreadURLHandlerFactory(URLStreamHandlerFactory)
   */
  public static URLStreamHandlerFactory getURLHandlerFactory(URLStreamHandlerFactory urlHandlerFact)
  {
    URLStreamHandlerFactory urlHandlerFactory = urlHandlerFact;
    if (urlHandlerFactory == null)
    {
      urlHandlerFactory = getThreadURLStreamHandlerFactory();
      if (urlHandlerFactory == null)
      {
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

        // This ensures tha HttpClient knows about the protocol
        Protocol.registerProtocol(LOOPBACK, new Protocol(LOOPBACK,new LoopbackHttpClientSocketFactory(),1));

        // Now allow the URL handling to work.
        URLStreamHandlerFactory ushf = new URLStreamHandlerFactory(){
            public URLStreamHandler createURLStreamHandler(String protocol) {
                if (protocol.equalsIgnoreCase(LOOPBACK)){
                    return new URLStreamHandler(){
                        @Override
                        protected URLConnection openConnection(URL u) throws IOException {
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

            LifecycleListenerGBean listenerChain,
            ServerInfo serverInfo,
            String objectName,
            WebManager manager) {
        // Register a stream handler factory for the JNDI protocol
        URLStreamHandlerFactory streamHandlerFactory =
            new DirContextURLStreamHandlerFactory();
        if (first) {
            first = false;
            try {
                URL.setURLStreamHandlerFactory(streamHandlerFactory);
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

    private URLHandlers()
    {
        m_sm = new SecurityManagerEx();
        synchronized (URL.class)
        {
            URLStreamHandlerFactory currentFactory = null;
            try
            {
                currentFactory = (URLStreamHandlerFactory) m_secureAction.swapStaticFieldIfNotClass(URL.class,
                    URLStreamHandlerFactory.class, URLHANDLERS_CLASS, "streamHandlerLock");
            }
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

        if (container.getResources() == null) {
            log.info("No resources for " + container);
            return;
        }
        // Register a stream handler factory for the JNDI protocol
        URLStreamHandlerFactory streamHandlerFactory =
            new DirContextURLStreamHandlerFactory();
        if (first) {
            first = false;
            try {
                URL.setURLStreamHandlerFactory(streamHandlerFactory);
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

            // the same asset database, because the URL handlers for asset
            // URLs will always map to this classloader.  For the purpose of
            // most scalability tests, this should be fine.
            ClassLoader loader = new URLClassLoader(jarUrls, getClass().getClassLoader());
            Class c = loader.loadClass("org.jdesktop.wonderland.client.jme.WonderlandURLStreamHandlerFactory");
            URLStreamHandlerFactory factory = (URLStreamHandlerFactory) c.newInstance();
            URL.setURLStreamHandlerFactory(factory);
        } catch (ClassNotFoundException cnfe) {
            throw new ProcessingException(cnfe);
        } catch (InstantiationException ie) {
            throw new ProcessingException(ie);
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

        if (container.getResources() == null) {
            log.info("No resources for " + container);
            return;
        }
        // Register a stream handler factory for the JNDI protocol
        URLStreamHandlerFactory streamHandlerFactory =
            new DirContextURLStreamHandlerFactory();
        if (first) {
            first = false;
            try {
                URL.setURLStreamHandlerFactory(streamHandlerFactory);
View Full Code Here

Examples of java.net.URLStreamHandlerFactory

        if (container.getResources() == null)
            return;

        // Register a stream handler factory for the JNDI protocol
        URLStreamHandlerFactory streamHandlerFactory =
            new DirContextURLStreamHandlerFactory();
        try {
            URL.setURLStreamHandlerFactory(streamHandlerFactory);
        } catch (Throwable t) {
            // Ignore the error here.
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.