Examples of TcpSink


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

   *
   * @param port the port to connect to
   * @return an instance of TcpSink
   */
  public TcpSink tcp(int port) {
    return new TcpSink(port);
  }
View Full Code Here

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

    assertThat(fileSink, eventually(hasContentsThat(equalTo("Hello"))));
  }

  @Test
  public void testTcpSink() throws Exception {
    TcpSink tcpSink = newTcpSink().start();
    HttpSource httpSource = newHttpSource();

    stream().create(generateStreamName(), "%s | %s", httpSource, tcpSink);
    httpSource.ensureReady().postData("Hi there!");
View Full Code Here

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

    private TcpSinkContentsMatcher(String expected) {
      this.expected = expected;
    }

    private String getSinkContents(Object sink) {
      TcpSink tcpSink = (TcpSink) sink;
      try {
        return new String(tcpSink.getReceivedBytes(), "ISO-8859-1");
      }
      catch (IOException e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

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

  protected TcpSource newTcpSource() {
    return new TcpSource();
  }

  protected TcpSink newTcpSink() {
    TcpSink tcpSink = new TcpSink();
    disposables.add(tcpSink);
    return tcpSink;
  }
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.