Package org.hornetq.api.core.client

Examples of org.hornetq.api.core.client.ClientRequestor.request()


                                          new HornetQAction()
                                          {

                                             public void run() throws Exception
                                             {
                                                requestor.request(session.createMessage(false), 500);
                                             }
                                          });
   }

   // Package protected ---------------------------------------------
View Full Code Here


            ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
            ClientMessage managementMessage = managementSession.createMessage(false);
            ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
            managementSession.start();
            HornetQServerLogger.LOGGER.debug("Requesting ID for: " + queue);
            ClientMessage reply = requestor.request(managementMessage);
            queueID = (Integer) ManagementHelper.getResult(reply);
            requestor.close();
            HornetQServerLogger.LOGGER.debug("ID for " + queue + " is: " + queueID);
            queueIDs.put(queue, queueID)// store it so we don't have to look it up every time
         }
View Full Code Here

            Integer.parseInt(reconnectAttempts),
            Boolean.parseBoolean(failoverOnInitialConnection),
            groupId);
            //Boolean.parseBoolean(cacheLargeMessagesClient));
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         HornetQServerLogger.LOGGER.debug("Created connection factory " + name);
      }
      else
View Full Code Here

      else if ("Topic".equals(type))
      {
         ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createTopic", name, entries);
      }
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         HornetQServerLogger.LOGGER.debug("Created " + type.toLowerCase() + " " + name);
      }
      else
View Full Code Here

         // address may need the message
         ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
         ClientMessage managementMessage = managementSession.createMessage(false);
         ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
         managementSession.start();
         ClientMessage reply = requestor.request(managementMessage);
         long queueID = (Integer) ManagementHelper.getResult(reply);
         logMessage.append(queue).append(", ");
         buffer.putLong(queueID);
      }
View Full Code Here

            ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
            ClientMessage managementMessage = managementSession.createMessage(false);
            ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
            managementSession.start();
            log.debug("Requesting ID for: " + queue);
            ClientMessage reply = requestor.request(managementMessage);
            queueID = (Integer) ManagementHelper.getResult(reply);
            requestor.close();
            log.debug("ID for " + queue + " is: " + queueID);
            queueIDs.put(queue, queueID)// store it so we don't have to look it up every time
         }
View Full Code Here

            Integer.parseInt(reconnectAttempts),
            Boolean.parseBoolean(failoverOnInitialConnection),
            groupId);
            //Boolean.parseBoolean(cacheLargeMessagesClient));
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         log.debug("Created connection factory " + name);
      }
      else
View Full Code Here

      else if ("Topic".equals(type))
      {
         ManagementHelper.putOperationInvocation(managementMessage, ResourceNames.JMS_SERVER, "createTopic", name, entries);
      }
      managementSession.start();
      ClientMessage reply = requestor.request(managementMessage);
      if (ManagementHelper.hasOperationSucceeded(reply))
      {
         log.debug("Created " + type.toLowerCase() + " " + name);
      }
      else
View Full Code Here

         // address may need the message
         ClientRequestor requestor = new ClientRequestor(managementSession, "jms.queue.hornetq.management");
         ClientMessage managementMessage = managementSession.createMessage(false);
         ManagementHelper.putAttribute(managementMessage, "core.queue." + queue, "ID");
         managementSession.start();
         ClientMessage reply = requestor.request(managementMessage);
         long queueID = (Integer) ManagementHelper.getResult(reply);
         logMessage.append(queue).append(", ");
         buffer.putLong(queueID);
      }
View Full Code Here

      ClientRequestor requestor = new ClientRequestor(session, requestAddress);
      ClientMessage request = session.createMessage(false);
      request.putLongProperty(key, value);

      ClientMessage reply = requestor.request(request, 500);
      Assert.assertNotNull("reply was not received", reply);
      Assert.assertEquals(value, reply.getObjectProperty(key));

      Thread.sleep(5000);
      session.close();
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.