Examples of prepare()


Examples of org.apache.tuscany.spi.component.CompositeComponent.prepare()

        EasyMock.expect(inbound.getContainer()).andReturn(target);
        EasyMock.replay(inbound);

        parent.register(target);
        parent.prepare();
        EasyMock.verify(source);
        EasyMock.verify(target);
        EasyMock.verify(inbound);
        EasyMock.verify(outbound);
    }
View Full Code Here

Examples of org.apache.tuscany.spi.component.SystemAtomicComponent.prepare()

        source.getInboundWires();
        EasyMock.expectLastCall().andReturn(Collections.emptyMap());
        EasyMock.expect(source.isSystem()).andReturn(true).atLeastOnce();
        EasyMock.expect(source.getParent()).andReturn(parent).atLeastOnce();

        source.prepare();
        EasyMock.replay(source);

        EasyMock.expect(outbound.getContainer()).andReturn(source);
        EasyMock.replay(outbound);
View Full Code Here

Examples of org.apache.tuscany.spi.wire.InboundInvocationChain.prepare()

        Operation<Type> operation = new Operation<Type>("test", null, null, null, false, null);
        chain.setTargetInvoker(null);
        expectLastCall();
        chain.getOperation();
        expectLastCall().andReturn(operation);
        chain.prepare();
        expectLastCall();
        InboundWire wire = createMock(InboundWire.class);
        wire.getInvocationChains();
        Map<Operation, InvocationChain> chains = new HashMap<Operation, InvocationChain>();
        chains.put(operation, chain);
View Full Code Here

Examples of org.apache.tuscany.spi.wire.OutboundInvocationChain.prepare()

        MockStaticInvoker invoker = new MockStaticInvoker(m, new TestBeanImpl());
        OutboundInvocationChain chain = new OutboundInvocationChainImpl(operation);
        chain.addInterceptor(new MockSyncInterceptor());
        chain.setTargetInvoker(invoker);
        chain.setTargetInterceptor(new InvokerInterceptor());
        chain.prepare();
        return chain;
    }

    public interface TestBean {
View Full Code Here

Examples of org.apache.twill.api.TwillRunner.prepare()

  private static final Logger LOG = LoggerFactory.getLogger(SessionExpireTestRun.class);

  @Test
  public void testAppSessionExpire() throws InterruptedException, ExecutionException {
    TwillRunner runner = YarnTestUtils.getTwillRunner();
    TwillController controller = runner.prepare(new SleepRunnable(600))
                                       .addLogHandler(new PrinterLogHandler(new PrintWriter(System.out, true)))
                                       .start();

    final CountDownLatch runLatch = new CountDownLatch(1);
    controller.addListener(new ServiceListenerAdapter() {
View Full Code Here

Examples of org.apache.twill.api.TwillRunnerService.prepare()

      new YarnTwillRunnerService(
        new YarnConfiguration(), zkStr);
    twillRunner.startAndWait();

    final TwillController controller =
      twillRunner.prepare(new HelloWorldRunnable())
        .addLogHandler(new PrinterLogHandler(new PrintWriter(System.out, true)))
        .start();

    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
View Full Code Here

Examples of org.apache.twill.kafka.client.KafkaPublisher.prepare()

      LOG.warn("Unable to get kafka publisher, will not be able to publish metrics.");
      return;
    }
    encoderOutputStream.reset();

    KafkaPublisher.Preparer preparer = publisher.prepare(topicPrefix + "." + scope.name().toLowerCase());
    while (metrics.hasNext()) {
      // Encode each MetricRecord into bytes and make it an individual kafka message in a message set.
      MetricsRecord record = metrics.next();
      recordWriter.encode(record, encoder);
      preparer.add(ByteBuffer.wrap(encoderOutputStream.toByteArray()), record.getContext());
View Full Code Here

Examples of org.apache.twill.yarn.YarnTwillRunnerService.prepare()

    final TwillRunnerService twillRunner = new YarnTwillRunnerService(new YarnConfiguration(), zkStr);
    twillRunner.startAndWait();


    final TwillController controller = twillRunner.prepare(
      new ExampleBundledJarApp(jarFile.getName(), jarFile.toURI()))
      .withArguments("BundledJarRunnable", arguments.toArray())
      .addLogHandler(new PrinterLogHandler(new PrintWriter(System.out, true)))
      .start();
View Full Code Here

Examples of org.apache.ws.security.message.WSSecDKEncrypt.prepare()

                    dkEncr.setParts(encrParts);
                    dkEncr.setCustomValueType(WSConstants.SOAPMESSAGE_NS11 + "#"
                            + WSConstants.ENC_KEY_VALUE_TYPE);
                    dkEncr.setSymmetricEncAlgorithm(algorithmSuite.getEncryption());
                    dkEncr.setDerivedKeyLength(algorithmSuite.getEncryptionDerivedKeyLength() / 8);
                    dkEncr.prepare(saaj.getSOAPPart());
                   
                    addDerivedKeyElement(dkEncr.getdktElement());
                    Element refList = dkEncr.encryptForExternalRef(null, encrParts);
                    insertBeforeBottomUp(refList);
                    return dkEncr;
View Full Code Here

Examples of org.apache.ws.security.message.WSSecDKSign.prepare()

            dkSig.setSignatureAlgorithm(binding.getAlgorithmSuite().getSymmetricSignature());
            dkSig.setDerivedKeyLength(binding.getAlgorithmSuite().getSignatureDerivedKeyLength() / 8);
           
            dkSig.setExternalKey(encrKey.getEphemeralKey(), encrKey.getId());
           
            dkSig.prepare(doc, secHeader);
           
            dkSig.setParts(sigParts);
            List<Reference> referenceList = dkSig.addReferencesToSign(sigParts, secHeader);
           
            //Do signature
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.