Examples of TcpSource


Examples of org.springframework.xd.test.fixtures.TcpSource

   * @param host the host ip where tcp data will be posted.
   * @param port the port to connect to
   * @return an instance of TcpSource
   */
  public TcpSource tcp(String host, int port) {
    return new TcpSource(host, port);
  }
View Full Code Here

Examples of org.springframework.xd.test.fixtures.TcpSource

*/
public class TcpModulesTests extends AbstractStreamIntegrationTest {

  @Test
  public void testTcpSource() throws Exception {
    TcpSource tcpSource = newTcpSource();
    FileSink fileSink = newFileSink().binary(true);
    stream().create(generateStreamName(), "%s | %s", tcpSource, fileSink);

    // Following \r\n is because of CRLF deserializer
    tcpSource.ensureReady().sendBytes("Hello\r\n".getBytes("UTF-8"));
    assertThat(fileSink, eventually(hasContentsThat(equalTo("Hello"))));
  }
View Full Code Here

Examples of org.springframework.xd.test.fixtures.TcpSource

      disposable.cleanup();
    }
  }

  protected TcpSource newTcpSource() {
    return new TcpSource();
  }
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.