public class LocalStreamWriter extends Object implements StreamWriter
StreamWriter to enable you to write to streams in tests without making HTTP requests| Constructor and Description |
|---|
LocalStreamWriter(co.cask.cdap.proto.Id.Run run,
StreamManagerFactory streamManagerFactory) |
| Modifier and Type | Method and Description |
|---|---|
StreamBatchWriter |
createBatchWriter(String stream,
String contentType) |
void |
write(String stream,
ByteBuffer data) |
void |
write(String stream,
co.cask.cdap.api.stream.StreamEventData data) |
void |
write(String stream,
String data) |
void |
write(String stream,
String data,
Map<String,String> headers) |
void |
writeFile(String stream,
File file,
String contentType) |
@Inject
public LocalStreamWriter(co.cask.cdap.proto.Id.Run run,
StreamManagerFactory streamManagerFactory)
public void write(String stream, String data) throws IOException
write in interface StreamWriterIOExceptionpublic void write(String stream, String data, Map<String,String> headers) throws IOException
write in interface StreamWriterIOExceptionpublic void write(String stream, ByteBuffer data) throws IOException
write in interface StreamWriterIOExceptionpublic void write(String stream, co.cask.cdap.api.stream.StreamEventData data) throws IOException
write in interface StreamWriterIOExceptionpublic void writeFile(String stream, File file, String contentType) throws IOException
writeFile in interface StreamWriterIOExceptionpublic StreamBatchWriter createBatchWriter(String stream, String contentType) throws IOException
createBatchWriter in interface StreamWriterIOExceptionCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.