Examples of create()


Examples of org.apache.flume.SinkFactory.create()

  
  
    @Test
    public void testSinkCreation() {
        SinkFactory factory = new DefaultSinkFactory ();
        Sink sink = factory.create("PhoenixSink__", "org.apache.phoenix.flume.sink.PhoenixSink");
        Assert.assertNotNull(sink);
        Assert.assertTrue(PhoenixSink.class.isInstance(sink));
    }
    @Test
    public void testConfiguration () {

Examples of org.apache.flume.sink.DefaultSinkFactory.create()

  
  
    @Test
    public void testSinkCreation() {
        SinkFactory factory = new DefaultSinkFactory ();
        Sink sink = factory.create("PhoenixSink__", "org.apache.phoenix.flume.sink.PhoenixSink");
        Assert.assertNotNull(sink);
        Assert.assertTrue(PhoenixSink.class.isInstance(sink));
    }
    @Test
    public void testConfiguration () {

Examples of org.apache.fop.svg.PDFDocumentGraphics2D.create()

                (int)Math.ceil(UnitConv.mm2pt(210)),
                (int)Math.ceil(UnitConv.mm2pt(297))); //page size A4 (in pt)
        g2d.setupDocument(baout, pageSize.width, pageSize.height);

        //A few rectangles rotated and with different color
        Graphics2D copy = (Graphics2D)g2d.create();
        int c = 12;
        for (int i = 0; i < c; i++) {
            float f = ((i + 1) / (float)c);
            Color col = new Color(0.0f, 1 - f, 0.0f);
            copy.setColor(col);

Examples of org.apache.geronimo.datastore.impl.GFileDAO.create()

        ByteArrayInputStream in = new ByteArrayInputStream(content);
        GFileTO fileTO = new GFileTO(path, props, in);
        GFileDAO fileDAO = new LocalGFileDAO(root);

        // Create.
        fileDAO.create(fileTO);
       
        // Read.
        fileTO = fileDAO.read(path);
        assertEquals("Wrong path", path, fileTO.getPath());
        props = fileTO.getProperties();

Examples of org.apache.geronimo.datastore.impl.local.LocalGFileDAO.create()

        ByteArrayInputStream in = new ByteArrayInputStream(content);
        GFileTO fileTO = new GFileTO(path, props, in);
        GFileDAO fileDAO = new LocalGFileDAO(root);

        // Create.
        fileDAO.create(fileTO);
       
        // Read.
        fileTO = fileDAO.read(path);
        assertEquals("Wrong path", path, fileTO.getPath());
        props = fileTO.getProperties();

Examples of org.apache.geronimo.gbean.jmx.CGLibProxyFactory.create()

        printResults("Raw Invoker", end, start, iterations);

        // cglib proxy
        ProxyFactory cgLibProxyFactory = new CGLibProxyFactory(MyInterface.class);
        ProxyMethodInterceptor cgLibMethodInterceptor = cgLibProxyFactory.getMethodInterceptor();
        MyInterface cgLibProxy = (MyInterface) cgLibProxyFactory.create(cgLibMethodInterceptor);
        cgLibMethodInterceptor.connect(kernel.getMBeanServer(), objectName);
        iterations = 1000000;
        for (int i = 0; i < iterations; i++) {
            cgLibProxy.doNothing();
        }

Examples of org.apache.geronimo.gbean.jmx.ProxyFactory.create()

        }

        ProxyFactory factory = ProxyFactory.newProxyFactory(type);
        ProxyMethodInterceptor methodInterceptor = factory.getMethodInterceptor();
        methodInterceptor.connect(server, objectName);
        return factory.create(methodInterceptor);
    }
}

Examples of org.apache.geronimo.gbean.jmx.VMProxyFactory.create()

        kernel.startGBean(objectName);

        // reflect proxy
        ProxyFactory vmProxyFactory = new VMProxyFactory(MyInterface.class);
        ProxyMethodInterceptor vmMethodInterceptor = vmProxyFactory.getMethodInterceptor();
        MyInterface vmProxy = (MyInterface) vmProxyFactory.create(vmMethodInterceptor);
        vmMethodInterceptor.connect(kernel.getMBeanServer(), objectName);
        iterations = 50000;
        for (int i = 0; i < iterations; i++) {
            vmProxy.doNothing();
        }

Examples of org.apache.geronimo.gshell.application.ApplicationManager.create()

                                   "META-INF/spring/gshell-vfs.xml",
                                   "META-INF/spring/gshell-commands.xml",
                                   "org/apache/servicemix/kernel/gshell/core/gshell-test.xml" });
            ApplicationManager appMgr = (ApplicationManager) context.getBean("applicationManager");
            assertNotNull(appMgr);
            Shell shell = appMgr.create();
            assertNotNull(shell);
            shell.execute("help");
        } finally {
            if (context != null) {
                context.destroy();

Examples of org.apache.geronimo.network.protocol.PacketFactory.create()

        Integer key = new Integer(buffer.getInt());
        PacketFactory factory = (PacketFactory) factories.get(key);

        if (factory == null) throw new ProtocolException("No factory registered for " + key);

        return factory.create(buffer.slice());
    }

}
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.