public static Flow<String, ByteString, NotUsed> string(String callbackName) {
    return Flow.of(String.class)
        .map(
            str -> {
              return ByteString.fromString("'" + StringEscapeUtils.escapeEcmaScript(str) + "'");
            })
        .via(flow(callbackName));
  }
public static Flow<String, ByteString, NotUsed> string(String callbackName) {
    return Flow.of(String.class)
        .map(
            str -> {
              return ByteString.fromString("'" + StringEscapeUtils.escapeEcmaScript(str) + "'");
            })
        .via(flow(callbackName));
  }
public static Flow < String , ByteString , NotUsed > string ( String callbackName ) { return Flow . of ( String . class ) . map ( str -> { return ByteString . fromString ( "'" + StringEscapeUtils . escapeEcmaScript ( str ) + "'" ) ; } ) . via ( flow ( callbackName ) ) ; }
Produces a Flow of escaped ByteString from a series of String elements. Calls out to Comet.flow
internally.

@param callbackName the javascript callback method.
@return a flow of ByteString elements.
Produces a Flow of escaped ByteString from a series of String elements . Calls out to Comet . flow internally .