Examples of connectBlocking()


Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

public class StompProducerTest extends StompBaseTest {

    @Test
    public void testProduce() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection subscribeConnection = stomp.connectBlocking();

        StompFrame frame = new StompFrame(SUBSCRIBE);
        frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
        frame.addHeader(ID, subscribeConnection.nextId());
        StompFrame response = subscribeConnection.request(frame);
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

public class StompConsumerTest extends StompBaseTest {

    @Test
    public void testConsume() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

public class StompConsumerUriTest extends StompBaseTest {

    @Test
    public void testConsume() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

        context.addRoutes(createRouteBuilder());
        context.start();

        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection subscribeConnection = stomp.connectBlocking();

        StompFrame frame = new StompFrame(SUBSCRIBE);
        frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
        frame.addHeader(ID, subscribeConnection.nextId());
        StompFrame response = subscribeConnection.request(frame);
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

        context.addRoutes(createRouteBuilder());
        context.start();

        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

        context.addRoutes(createRouteBuilder());
        context.start();

        Stomp stomp = new Stomp("tcp://localhost:" + getPort());
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

        DetectingGateway gateway = createGateway();

        // Lets establish a connection....
        Stomp stomp = new Stomp("localhost", gateway.getBoundPort());
        stomp.setHost("broker0"); // lets connect to the broker0 virtual host..
        org.fusesource.stomp.client.BlockingConnection connection = stomp.connectBlocking();

        assertConnectedToBroker(0);
        connection.close();
    }
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

public class StompProducerTest extends StompBaseTest {

    @Test
    public void testProduce() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:61613");
        final BlockingConnection subscribeConnection = stomp.connectBlocking();

        StompFrame frame = new StompFrame(SUBSCRIBE);
        frame.addHeader(DESTINATION, StompFrame.encodeHeader("/queue/test"));
        frame.addHeader(ID, subscribeConnection.nextId());
        StompFrame response = subscribeConnection.request(frame);
View Full Code Here

Examples of org.fusesource.stomp.client.Stomp.connectBlocking()

public class StompConsumerTest extends StompBaseTest {

    @Test
    public void testConsume() throws Exception {
        Stomp stomp = new Stomp("tcp://localhost:61613");
        final BlockingConnection producerConnection = stomp.connectBlocking();

        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(numberOfMessages);

        for (int i = 0; i < numberOfMessages; i++) {
View Full Code Here

Examples of org.java_websocket.client.WebSocketClient.connectBlocking()

public class FragmentedFramesExample {
  public static void main( String[] args ) throws URISyntaxException , IOException , InterruptedException {
    // WebSocketImpl.DEBUG = true; // will give extra output

    WebSocketClient websocket = new ExampleClient( new URI( "ws://localhost:8887" ), new Draft_17() ); // Draft_17 is implementation of rfc6455
    if( !websocket.connectBlocking() ) {
      System.err.println( "Could not connect to the server." );
      return;
    }

    System.out.println( "This example shows how to send fragmented(continuous) messages." );
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.