Skip to content

Commit 4382295

Browse files
FromFilesMessageBodySource => LocalFilesMessageBodySource
1 parent 7bb42e8 commit 4382295

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/main/java/com/rabbitmq/perf/FromFilesMessageBodySource.java renamed to src/main/java/com/rabbitmq/perf/LocalFilesMessageBodySource.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
/**
2323
*
2424
*/
25-
public class FromFilesMessageBodySource implements MessageBodySource {
25+
public class LocalFilesMessageBodySource implements MessageBodySource {
2626

2727
private final List<byte[]> bodies;
2828

2929
private final String contentType;
3030

31-
public FromFilesMessageBodySource(List<String> filesNames, String contentType) throws IOException {
31+
public LocalFilesMessageBodySource(List<String> filesNames, String contentType) throws IOException {
3232
bodies = new ArrayList<byte[]>(filesNames.size());
3333
for (String fileName : filesNames) {
3434
File file = new File(fileName.trim());
@@ -51,7 +51,7 @@ public FromFilesMessageBodySource(List<String> filesNames, String contentType) t
5151
this.contentType = contentType;
5252
}
5353

54-
public FromFilesMessageBodySource(List<String> filesNames) throws IOException {
54+
public LocalFilesMessageBodySource(List<String> filesNames) throws IOException {
5555
this(filesNames, null);
5656
}
5757

src/main/java/com/rabbitmq/perf/MulticastParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public Producer createProducer(Connection connection, Stats stats, String id) th
225225
}
226226
MessageBodySource messageBodySource = null;
227227
if (bodyFiles.size() > 0) {
228-
messageBodySource = new FromFilesMessageBodySource(bodyFiles, bodyContentType);
228+
messageBodySource = new LocalFilesMessageBodySource(bodyFiles, bodyContentType);
229229
} else {
230230
messageBodySource = new SequenceTimeMessageBodySource(minMsgSize);
231231
}

src/test/java/com/rabbitmq/perf/FromFilesMessageBodySourceTest.java renamed to src/test/java/com/rabbitmq/perf/LocalFilesMessageBodySourceTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
/**
3232
*
3333
*/
34-
public class FromFilesMessageBodySourceTest {
34+
public class LocalFilesMessageBodySourceTest {
3535

3636
@Rule
3737
public TemporaryFolder folder = new TemporaryFolder();
@@ -40,7 +40,7 @@ public class FromFilesMessageBodySourceTest {
4040
File file = folder.newFile("content.txt");
4141
String content = "dummy content";
4242
write(file, content);
43-
MessageBodySource creator = new FromFilesMessageBodySource(asList(file.getAbsolutePath()));
43+
MessageBodySource creator = new LocalFilesMessageBodySource(asList(file.getAbsolutePath()));
4444
byte[] body1 = creator.create(1).getBody();
4545
byte[] body2 = creator.create(1).getBody();
4646
assertEquals(content, new String(body1, "UTF-8"));
@@ -56,7 +56,7 @@ public class FromFilesMessageBodySourceTest {
5656
files.add(file.getAbsolutePath());
5757
}
5858

59-
MessageBodySource creator = new FromFilesMessageBodySource(files);
59+
MessageBodySource creator = new LocalFilesMessageBodySource(files);
6060
byte[] body0 = creator.create(0).getBody();
6161
assertEquals("content0", new String(body0, "UTF-8"));
6262
byte[] body1 = creator.create(1).getBody();
@@ -70,7 +70,7 @@ public class FromFilesMessageBodySourceTest {
7070
@Test public void createFileDoesNotExist() throws Exception {
7171
File file = new File(folder.getRoot(), "dummy.txt");
7272
try {
73-
new FromFilesMessageBodySource(asList(file.getAbsolutePath()));
73+
new LocalFilesMessageBodySource(asList(file.getAbsolutePath()));
7474
fail("File does not exist, exception should have thrown");
7575
} catch (IllegalArgumentException e) {
7676
// ok

0 commit comments

Comments
 (0)