Examples of request()


Examples of org.activemq.bean.Requestor.request()

        TextMessage message = session.createTextMessage("Hello! " + new Date());

        System.out.println("About to send: " + message);


        Message answer = requestor.request(message);

        assertTrue("Should have received an answer", answer != null);

        System.out.println("Received: " + answer);
    }
View Full Code Here

Examples of org.apache.abdera.protocol.server.Provider.request()

    ItemManager<Provider> manager = context.getProviderManager();
    Provider provider = manager.get(request);
    log.debug(Messages.format("USING.PROVIDER",provider));
    try {
      if (preconditions(provider, request, response)) {
        output(request, response,provider.request(request));
      }
    } catch (Throwable e) {
      log.error(Messages.get("OUTPUT.ERROR"), e);
      try {
        output(request,response,new EmptyResponseContext(500));
View Full Code Here

Examples of org.apache.activemq.broker.StubConnection.request()

        ConnectionInfo connectionInfo1 = createConnectionInfo();
        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
        connection1.send(connectionInfo1);
        connection1.send(sessionInfo1);
        connection1.request(consumerInfo1);

        // Start a normal consumer on a remote broker
        StubConnection connection2 = createRemoteConnection();
        ConnectionInfo connectionInfo2 = createConnectionInfo();
        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
View Full Code Here

Examples of org.apache.avro.generic.GenericRequestor.request()

    GenericRecord params = new GenericData.Record(
        TestBasicTracing.advancedProtocol.getMessages().get("w").getRequest());
    params.put("req", 1);
   
    for (int i = 0; i < 40; i++) {
      r.request("w", params)
    }
   
    List<Span> allSpans = new ArrayList<Span>();
    allSpans.addAll(aPlugin.storage.getAllSpans());
    allSpans.addAll(bPlugin.storage.getAllSpans());
View Full Code Here

Examples of org.apache.avro.ipc.Requestor.request()

    try {
      Requestor r = new GenericRequestor(protocol, t);
      GenericRecord params = new GenericData.Record(message.getRequest());
      params.put("extra", Boolean.TRUE);
      params.put("greeting", new Utf8("bob"));
      Utf8 response = (Utf8)r.request("hello", params);
      assertEquals(new Utf8("goodbye"), response);
    } finally {
      t.close();
    }
  }
View Full Code Here

Examples of org.apache.avro.ipc.generic.GenericRequestor.request()

    Schema schema = protocol.getMessages().get("xyz").getRequest();
    GenericData.Record request = new GenericData.Record(schema);
    request.put("message", message);

    Object result = requestor.request("xyz", request);
    System.out.println(result);
  }
}
View Full Code Here

Examples of org.apache.batik.ext.awt.image.URLImageCache.request()

        Filter      ret        = null;
        URLImageCache cache;
        if (needRawData) cache = rawCache;
        else             cache = imgCache;

        ret = cache.request(purl);
        if (ret != null) {
            // System.out.println("Image came from cache" + purl);
            if (colorSpace != null)
                ret = new ProfileRable(ret, colorSpace);
            return ret;
View Full Code Here

Examples of org.apache.camel.ProducerTemplate.request()

    @Test
    public void testCxfBusConfiguration() throws Exception {
        // get the camelContext from application context
        ProducerTemplate template = context.createProducerTemplate();

        Exchange reply = template.request("cxf:bean:serviceEndpoint", new Processor() {
            public void process(final Exchange exchange) {
                final List<String> params = new ArrayList<String>();
                params.add("hello");
                exchange.getIn().setBody(params);
                exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, "echo");
View Full Code Here

Examples of org.apache.cxf.jaxrs.ext.xml.ElementClass.request()

    }

    public static Class<?> getActualJaxbType(Class<?> type, Method resourceMethod, boolean inbound) {
        ElementClass element = resourceMethod.getAnnotation(ElementClass.class);
        if  (element != null) {
            Class<?> cls = inbound ? element.request() : element.response();
            if (cls != Object.class) {
                return cls;
            }
        }
        return type;
View Full Code Here

Examples of org.apache.cxf.jaxrs.model.wadl.ElementClass.request()

    }

    public static Class<?> getActualJaxbType(Class<?> type, Method resourceMethod, boolean inbound) {
        ElementClass element = resourceMethod.getAnnotation(ElementClass.class);
        if  (element != null) {
            Class<?> cls = inbound ? element.request() : element.response();
            if (cls != Object.class) {
                return cls;
            }
        }
        return type;
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.