Examples of Source


Examples of org.apache.qpid.amqp_1_0.type.messaging.Source

                                             org.apache.qpid.amqp_1_0.client.AcknowledgeMode.ALO, false);

            final org.apache.qpid.amqp_1_0.type.Source receiverSource = receiver.getSource();
            if(receiverSource instanceof Source)
            {
                Source source = (Source) receiverSource;
                receiver.close();
                receiver = new Receiver(getClientSession(), s, target, source,
                        org.apache.qpid.amqp_1_0.client.AcknowledgeMode.ALO, false);

            }
View Full Code Here

Examples of org.apache.qpid.proton.amqp.messaging.Source

            Sender sender = session.sender(_path);
            Target target = new Target();
            target.setAddress(_path);
            sender.setTarget(target);
            // the C implemenation does this:
            Source source = new Source();
            source.setAddress(_path);
            sender.setSource(source);
            if (getOutgoingWindow() > 0)
            {
                // use explicit settlement via dispositions (not pre-settled)
                sender.setSenderSettleMode(SenderSettleMode.UNSETTLED);
View Full Code Here

Examples of org.apache.sling.models.annotations.Source

        PhantomReference<Object> reference = new PhantomReference<Object>(object, queue);
        disposalCallbacks.put(reference, registry);
    }

    private String getSource(AnnotatedElement element) {
        Source source = getAnnotation(element, Source.class);
        if (source != null) {
            return source.value();
        } else {
            return null;
        }
    }
View Full Code Here

Examples of org.apache.synapse.mediators.elementary.Source

        OMElement sourceEle = elem.getFirstChildWithName(SOURCE_Q);
        if (sourceEle == null) {
            handleException("source element is mandatory");
        }
        Source source = new Source();
        enrich.setSource(source);

        OMElement targetEle = elem.getFirstChildWithName(TARGET_Q);
        if (targetEle == null) {
            handleException("target element is mandatory");
View Full Code Here

Examples of org.apache.torque.generator.source.Source

            log.info("No sources found, skipping output");
        }

        while (sourceProvider.hasNext())
        {
            Source source = sourceProvider.next();
            processSourceInOutput(
                    source,
                    output,
                    controllerState,
                    unitConfiguration);
View Full Code Here

Examples of org.apache.tuscany.container.java.mock.components.Source

       
        CompositeContext context = createContext();
        context.start();
        context.registerModelObject(MockFactory.createModuleWithWiredComponentsOfDifferentInterface(Scope.MODULE, Scope.MODULE));
        context.publish(new ModuleStart(this));
        Source source = (Source) ((AtomicContext) context.getContext("source")).getTargetInstance();
        Assert.assertNotNull(source);
        OtherTarget target = (OtherTarget) ((AtomicContext)context.getContext("target")).getTargetInstance();
        Assert.assertNotNull(target);
        // test setter injection
        List<Target> targets = source.getTargets();
        Assert.assertEquals(1, targets.size());
       
        // test field injection
        targets = source.getTargetsThroughField();
        Assert.assertEquals(1, targets.size());
        targets.get(0).setString("foo");
        Assert.assertEquals("foo",target.getString());
    }
View Full Code Here

Examples of org.apache.tuscany.core.implementation.java.mock.components.Source

                "target",
                OtherTarget.class,
                OtherTargetImpl.class,
                scope);
        AtomicComponent sourceComponent = contexts.get("source");
        Source source = (Source) sourceComponent.getServiceInstance();
        Target target = source.getTarget();
        assertTrue(Proxy.isProxyClass(target.getClass()));
        assertNotNull(target);
        scope.stop();
        EasyMock.verify(scope);
    }
View Full Code Here

Examples of org.apache.tuscany.core.mock.component.Source

    public void testModuleToModuleScope() throws Exception {
        SystemCompositeContext context = createContext();
        context.start();
        context.registerModelObject(MockFactory.createSystemModuleWithWiredComponents("system.module",Scope.MODULE, Scope.MODULE));
        context.publish(new ModuleStart(this));
        Source source = (Source) ((AtomicContext) context.getContext("source")).getTargetInstance();
        Assert.assertNotNull(source);
        Target targetRef = source.getTarget();
        Assert.assertNotNull(targetRef);
        Target target = (Target) ((AtomicContext) context.getContext("target")).getTargetInstance();
        Assert.assertSame(target, targetRef);
        Assert.assertSame(target, source.getTarget());
        context.publish(new ModuleStop(this));
        context.stop();
    }
View Full Code Here

Examples of org.codehaus.enunciate.samples.genealogy.cite.Source

  @GET
  @Path ("{id}")
  public Source getSource(@PathParam ("id") String id) throws ServiceException, UnknownSourceException {
    if ("valid".equals(id)) {
      Source source = new Source();
      source.setId("valid");
      source.setLink(URI.create("uri:some-uri"));
      source.setTitle("some-title");
      return source;
    }
    else if ("throw".equals(id)) {
      throw new ServiceException("some message", "another message");
    }
View Full Code Here

Examples of org.codehaus.enunciate.samples.genealogy.jaxws_client.cite.Source

      context = System.getProperty("container.test.context");
    }

    SourceServiceImpl impl = new SourceServiceImpl("http://localhost:" + port + "/" + context + "/soap-services/sources/source");
    SourceService sourceService = impl;
    Source source = sourceService.getSource("valid");
    Assert.assertEquals("valid", source.getId());
    Assert.assertEquals(URI.create("uri:some-uri"), source.getLink());
    Assert.assertEquals("some-title", source.getTitle());
    assertNull(sourceService.getSource("invalid"));

    try {
      sourceService.getSource("throw");
      fail("Should have thrown the exception.");
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.