Package org.apache.commons.discovery.tools

Examples of org.apache.commons.discovery.tools.SPInterface


        // Note:  I wish AxisProperties.newInstance could return null,
        // but it doesn't seem to; makes the following if check a bit more complex,
        // and disallows someone explicitly forcing JDK13IO over the others.
        ImageIO imageIO =
            (ImageIO)AxisProperties.newInstance(
                         new SPInterface(ImageIO.class, "axis.ImageIO"), "org.apache.axis.components.image.JDK13IO");
       
        if (imageIO == null || imageIO.getClass() ==
                org.apache.axis.components.image.JDK13IO.class) {
            // If the imageIO is not configured look for the following:
            // 1.  Try the JDK 1.4 classes
View Full Code Here


        LogFactory.getLog(CompilerFactory.class.getName());

    public static Compiler getCompiler() {
        Compiler compiler =
            (Compiler)AxisProperties.newInstance(
                         new SPInterface(Compiler.class, "axis.Compiler"),
                         Javac.class);
       
        if (compiler == null) {
            log.debug(Messages.getMessage("defaultCompiler"));
            compiler = new Javac();
View Full Code Here

    protected static Log log =
        LogFactory.getLog(AxisProperties.class.getName());
   
    public static Object newInstance(Class spiClass, String defaultClass)
    {
        return newInstance(new SPInterface(spiClass), new DefaultClassHolder(defaultClass));
    }
View Full Code Here

        return newInstance(new SPInterface(spiClass), new DefaultClassHolder(defaultClass));
    }
   
    public static Object newInstance(Class spiClass, Class defaultClass)
    {
        return newInstance(new SPInterface(spiClass), new DefaultClassHolder(defaultClass));
    }
View Full Code Here

    public static synchronized SocketFactory getFactory(Hashtable attributes) {
        if (theFactory == null) {
            Object objects[] = new Object[] { attributes };

            theFactory = (SocketFactory)AxisProperties.newInstance(
                     new SPInterface(SocketFactory.class,
                                     "axis.socketFactory",
                                     classes,
                                     objects),
                     "org.apache.axis.components.net.DefaultSocketFactory");
        }
View Full Code Here

            Hashtable attributes) {
        if (theSecureFactory == null) {
            Object objects[] = new Object[] { attributes };

            theSecureFactory = (SocketFactory)AxisProperties.newInstance(
                    new SPInterface(SocketFactory.class,
                                    "axis.socketSecureFactory",
                                    classes,
                                    objects),
                    "org.apache.axis.components.net.JSSESocketFactory");
        }
View Full Code Here

    protected static Log log =
        LogFactory.getLog(AxisProperties.class.getName());
   
    public static Object newInstance(Class spiClass, String defaultClass)
    {
        return newInstance(new SPInterface(spiClass), new DefaultClassHolder(defaultClass));
    }
View Full Code Here

        return newInstance(new SPInterface(spiClass), new DefaultClassHolder(defaultClass));
    }
   
    public static Object newInstance(Class spiClass, Class defaultClass)
    {
        return newInstance(new SPInterface(spiClass), new DefaultClassHolder(defaultClass));
    }
View Full Code Here

        LogFactory.getLog(CompilerFactory.class.getName());

    public static Compiler getCompiler() {
        Compiler compiler =
            (Compiler)AxisProperties.newInstance(
                         new SPInterface(Compiler.class, "axis.Compiler"),
                         Javac.class);
       
        if (compiler == null) {
            log.debug(JavaUtils.getMessage("defaultCompiler"));
            compiler = new Javac();
View Full Code Here

        TestInterface1 ti = null;
       
        try {
            ti = (TestInterface1)DiscoverSingleton.find(null,
                                   new SPInterface(TestInterface1.class),
                                   new PropertiesHolder("TestInterface.properties"),
                                   new DefaultClassHolder(TestImpl1_2.class.getName()));

            assertTrue(ti.getClass().getName() + "!=" + TestImpl1_1.class.getName(),
                       ti.getClass().getName().equals(TestImpl1_1.class.getName()));
View Full Code Here

TOP

Related Classes of org.apache.commons.discovery.tools.SPInterface

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.