Package net.ser1.stomp

Examples of net.ser1.stomp.Client


   */
  private void connect()
  {
    try
    {
      client = new Client(serviceStarter.getMessageServer(), serviceStarter.getPort(), serviceStarter.getMessageServerUser(), serviceStarter.getMessageServerPass());

      /* Add a listener to watch for ERROR frames being returned */
      client.addErrorListener(new Listener()
      {
        @Override
View Full Code Here


//            return;
//        }
        String activeMqIp = "localhost"; //i.e "192.168.1.13
        int port = 61666;
        String channel = "/queue/command.jfrontend.user.callout";
        Client c;
        try {
            c = new Client(activeMqIp, port, "", "");
            System.out.println("Client connected on " + activeMqIp + ":" + port);
            new JavaStompClientSubscriberExample(c, channel);
        } catch (IOException ex) {
            Logger.getLogger(JavaStompClientSubscriberExample.class.getName()).log(Level.SEVERE, null, ex);
        } catch (LoginException ex) {
View Full Code Here



        String manifestDestination = "/queue/app.plugin.create";

        Client c;
        try {
            c = new Client(activeMqIp, 61666, "", "");
            System.out.println("Connected to broker");
            Map header = new HashMap();
            header.put("transformation", "jms-object-xml");
            header.put("reply-to", "/queue/app.data.response");
            System.out.println("Subscribe for replies to command");
            c.subscribe("/queue/app.data.response", new Listener() {
                @Override
                public void message(Map map, String string) {
                    System.out.println("STOMP client receives something...");
                    System.out.println(string);
                }
            });
            System.out.println("Sending XML manifest...");
            c.send(manifestDestination, manifest, header);
            System.out.println("Sending XML command...");
            c.send(commandDestination, command, header);
            System.out.println("Sending XML event...");
            c.send(eventDestination, event, header);
            System.out.println("sent");
        } catch (IOException ex) {
            Logger.getLogger(JavaStompClientExample.class.getName()).log(Level.SEVERE, null, ex);
        } catch (LoginException ex) {
            Logger.getLogger(JavaStompClientExample.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

    try
    {
      client = new Client(serviceStarter.getMessageServer(), serviceStarter.getPort(), serviceStarter.getMessageServerUser(), serviceStarter.getMessageServerPass());

      /* Add a listener to watch for ERROR frames being returned */
      client.addErrorListener(new Listener()
      {
        @Override
        public void message(@SuppressWarnings("rawtypes") Map headers, String body)
        {
          NotificationUtilities.dumpMessageToStdOut(body);
View Full Code Here

            System.out.println("Connected to broker");
            Map header = new HashMap();
            header.put("transformation", "jms-object-xml");
            header.put("reply-to", "/queue/app.data.response");
            System.out.println("Subscribe for replies to command");
            c.subscribe("/queue/app.data.response", new Listener() {
                @Override
                public void message(Map map, String string) {
                    System.out.println("STOMP client receives something...");
                    System.out.println(string);
                }
View Full Code Here

TOP

Related Classes of net.ser1.stomp.Client

Copyright © 2018 www.massapicom. 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.