Examples of create()


Examples of org.apache.tuscany.sca.databinding.WrapperHandler.create()

            // Class<?> targetWrapperClass = wrapper != null ? wrapper.getInputWrapperClass() : null;

            if (source == null) {
                // Empty child elements
                Object targetWrapper = targetWrapperHandler.create(targetOp, true);
                return new Object[] {targetWrapper};
            }

            // If the source can be wrapped, wrapped it first
            if (sourceWrapperHandler != null) {

Examples of org.apache.tuscany.sca.itest.allowspassbyreference.AServiceClient.create()

        test("ClientB2Component");
    }

    private void test(String serviceName) {
        AServiceClient client = node.getService(AServiceClient.class, serviceName);
        int id = client.create("A");
        String state = client.read(id);
        Assert.assertEquals("A", state);
        state = client.update(id, "B");
        Assert.assertEquals("B", state);
        client.delete(id);

Examples of org.apache.tuscany.spi.databinding.WrapperHandler.create()

            if ((!sourceWrapped) && targetWrapped) {
                // Unwrapped --> Wrapped
                WrapperInfo wrapper = targetOp.getWrapper();
                Object targetWrapper =
                    targetWrapperHandler.create(wrapper.getOutputWrapperElement(), context);
                if (response == null) {
                    return targetWrapper;
                }

                ElementInfo argElement = wrapper.getOutputChildElements().get(0);

Examples of org.apache.twill.filesystem.LocalLocationFactory.create()

    // Setup temporary directory structure
    tmpFolder = Files.createTempDir();
    LocationFactory locationFactory = new LocalLocationFactory(tmpFolder);

    Location baseDir = locationFactory.create("baseDir");
    baseDir.mkdirs();

    InputFlowletConfiguration inputFlowletConfiguration = new LocalInputFlowletConfiguration(baseDir, spec);
    Location binDir = inputFlowletConfiguration.createStreamEngineProcesses();

Examples of org.apache.twill.filesystem.LocationFactory.create()

    // Setup temporary directory structure
    tmpFolder = Files.createTempDir();
    LocationFactory locationFactory = new LocalLocationFactory(tmpFolder);

    Location baseDir = locationFactory.create("baseDir");
    baseDir.mkdirs();

    InputFlowletConfiguration inputFlowletConfiguration = new LocalInputFlowletConfiguration(baseDir, spec);
    Location binDir = inputFlowletConfiguration.createStreamEngineProcesses();

Examples of org.apache.twill.zookeeper.ZKClientService.create()

  public void testBrokerChange() throws Exception {
    // Create a new namespace in ZK for Kafka server for this test case
    String connectionStr = zkServer.getConnectionStr() + "/broker_change";
    ZKClientService zkClient = ZKClientService.Builder.of(connectionStr).build();
    zkClient.startAndWait();
    zkClient.create("/", null, CreateMode.PERSISTENT).get();

    // Start a new kafka server
    File logDir = TMP_FOLDER.newFolder();
    EmbeddedKafkaServer server = new EmbeddedKafkaServer(generateKafkaConfig(connectionStr, logDir));
    server.startAndWait();

Examples of org.apache.velocity.tools.view.CookieTool.create()

    }

    public @Test void testCreate_StringString()
    {
        CookieTool cookies = newCookieTool(new LinkedHashMap());
        Cookie c = cookies.create("a", "b");
        assertNotNull(c);
        assertEquals("a", c.getName());
        assertEquals("b", c.getValue());
        assertEquals(-1, c.getMaxAge());
    }

Examples of org.apache.whirr.ClusterControllerFactory.create()

        return siteXML;
    }

    private ClusterController createClusterController(String serviceName){
        ClusterControllerFactory factory = new ClusterControllerFactory();
        ClusterController controller = factory.create(serviceName);

        if(controller == null){
            logger.warn("Unable to find the service {0}, using default.", serviceName);
            controller = factory.create(null);
        }

Examples of org.apache.whirr.service.ClusterActionHandlerFactory.create()

    TestNodeStarterFactory nodeStarterFactory = null;
   
    ClusterActionHandlerFactory puppetHandlerFactory = mock(ClusterActionHandlerFactory.class);
    ClusterActionHandler handler = mock(ClusterActionHandler.class);
    when(puppetHandlerFactory.getRolePrefix()).thenReturn("puppet:");
    when(puppetHandlerFactory.create("module::manifest")).thenReturn(handler);
    when(handler.getRole()).thenReturn("something-else");

    LoadingCache<String, ClusterActionHandler> handlerMap = new HandlerMapFactory().create(ImmutableSet.of(puppetHandlerFactory),
          ImmutableSet.of(handler));

Examples of org.apache.whirr.service.ClusterStateStoreFactory.create()

    ClusterStateStore memStore = new MemoryClusterStateStore();
    memStore.save(createTestCluster(
      new String[]{"reg/A", "reg/B"}, new String[]{"A", "B"}));

    ClusterStateStoreFactory stateStoreFactory = mock(ClusterStateStoreFactory.class);
    when(stateStoreFactory.create((ClusterSpec) any())).thenReturn(memStore);

    RunScriptCommand command = new RunScriptCommand(factory, stateStoreFactory);
    Map<String, File> keys = KeyPair.generateTemporaryFiles();

    int rc = command.run(null, out, System.err, Lists.newArrayList(
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.