Package java.net

Examples of java.net.URLStreamHandlerFactory


            setState(LifecycleState.STARTING);
            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


            setState(LifecycleState.STARTING);
            return;
        }
       
        // Register a stream handler factory for the JNDI protocol
        URLStreamHandlerFactory streamHandlerFactory =
                DirContextURLStreamHandlerFactory.getInstance();
        if (first) {
            first = false;
            try {
                URL.setURLStreamHandlerFactory(streamHandlerFactory);
View Full Code Here

        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

                URLStreamHandlerFactoryInstaller.setURLStreamHandlerFactory(new DynamicURLStreamHandlerFactory());
                this.urlStreamHandlerInstalled = true;
            }

            for (Iterator i = this.urlHandlerFactories.values().iterator(); i.hasNext();) {
                URLStreamHandlerFactory streamHandlerFactory = (URLStreamHandlerFactory) i.next();
                DynamicURLStreamHandlerFactory.push(streamHandlerFactory);
            }

            return proceedingJoinPoint.proceed();
        } finally {
View Full Code Here

        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

    }

    private static synchronized void initStreamHandlerFactory() {
        // Register a stream handler factory for the JNDI protocol
        URLStreamHandlerFactory streamHandlerFactory =
            new DirContextURLStreamHandlerFactory();

        synchronized (WebappLoader.class) {
            if (first) {
                first = false;
View Full Code Here

        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

*
* @version $Rev: 46019 $ $Date: 2004-09-14 04:56:06 -0500 (Tue, 14 Sep 2004) $
*/
public class GeronimoURLFactoryTest extends TestCase {
    public void testForceInstall() throws Exception{
        URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
            public URLStreamHandler createURLStreamHandler(String protocol) {
                throw new RuntimeException("Bogus handler still installed");
            }
        });
        GeronimoURLFactory.forceInstall();
View Full Code Here

        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

    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

TOP

Related Classes of java.net.URLStreamHandlerFactory

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.