Package org.apache.activemq.transport.stomp

Examples of org.apache.activemq.transport.stomp.StompConnection.disconnect()


        // Need to let the transport have enough time to dispatch the incoming messages from
        // the socket before we break the connection.
        TimeUnit.SECONDS.sleep(5);

        connection.disconnect();

        // wait for poll to finish
        poll.waitForDone();
        String response = poll.getResponseContent();
View Full Code Here


    public void go() throws Exception {
        StompConnection connection = new StompConnection();
        connection.open("localhost", Integer.parseInt(connectionUri.replace("stomp://localhost:", "")));
        connection.connect("", "");
        connection.subscribe("/topic/foobar", Stomp.Headers.Subscribe.AckModeValues.CLIENT);
        connection.disconnect();
        Thread.sleep(1000);
       
        if (failed.get()) {
            fail("Received NullPointerException");
        }
View Full Code Here

        connection.send( "/queue/test", "message1", (String)null, headers );
        connection.send( "/queue/test", "message2", (String)null, headers );
        connection.send( "/queue/test", "message3", (String)null, headers );
        connection.send( "/queue/test", "message4", (String)null, headers );
        connection.send( "/queue/test", "message5", (String)null, headers );
        connection.disconnect();

        // wait for poll to finish
        poll.waitForDone();
        String response = poll.getResponseContent();
View Full Code Here

        // Need to let the transport have enough time to dispatch the incoming messages from
        // the socket before we break the connection.
        TimeUnit.SECONDS.sleep(5);

        connection.disconnect();

        // wait for poll to finish
        poll.waitForDone();
        String response = poll.getResponseContent();
View Full Code Here

        StompConnection connection = new StompConnection();
        Integer port = Integer.parseInt(connectionUri.split(":")[2]);
        connection.open("localhost", port);       
        connection.connect("", "");
        connection.subscribe("/topic/foobar", Stomp.Headers.Subscribe.AckModeValues.CLIENT);
        connection.disconnect();
        Thread.sleep(1000);

        if (failed.get()) {
            fail("Received NullPointerException");
        }
View Full Code Here

    System.out.println(message.getBody());
    connection.ack(message, "tx2");
   
    connection.commit("tx2");
   
    connection.disconnect();
  }
 
}
View Full Code Here

    System.out.println(message.getBody());
    connection.ack(message, "tx2");
   
    connection.commit("tx2");
   
    connection.disconnect();
  }
 
}
View Full Code Here

    System.out.println(message.getBody());
    connection.ack(message, "tx2");
   
    connection.commit("tx2");
   
    connection.disconnect();
  }
 
}
View Full Code Here

    System.out.println(message.getBody());
    connection.ack(message, "tx2");
   
    connection.commit("tx2");
   
    connection.disconnect();
  }
 
}
View Full Code Here

        // Need to let the transport have enough time to dispatch the incoming messages from
        // the socket before we break the connection.
        TimeUnit.SECONDS.sleep(5);

        connection.disconnect();

        // wait for poll to finish
        poll.waitForDone();
        String response = poll.getResponseContent();
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.