Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ include/ola/base/Version.h
include/ola/plugin_id.h
include/ola/rdm/RDMResponseCodes.h
include/ola/timecode/TimeCodeEnums.h
java/.classpath
java/classes/
java/generated-src/main/java/ola/proto/Ola.java
java/generated-src/main/java/ola/rpc/Rpc.java
Expand Down Expand Up @@ -238,3 +239,4 @@ javascript/new-src/node_modules
.autotools
.cproject
.settings
.vscode/
7 changes: 7 additions & 0 deletions java/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
04/22/2017 Erez Makavy <hepi.yellow@gmail.com>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to have a ChangeLog (and I'm personally undecided), can you add some info about v0.0.1 too please.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* v0.0.2
- Add OlaClient.getUniverseList()

03/11/2012 Simon Newton <nomis52@gmail.com>
* v0.0.1
- Add initial Java API from Favy Vanherbergen
6 changes: 3 additions & 3 deletions java/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ CLEANFILES = generated-src/main/java/ola/proto/Ola.java \
classes/ola/*.class \
test-classes/ola/*.class \
maven-archiver/pom.properties \
surefire-reports/ola.*.txt \
surefire-reports/TEST-*.xml \
ola-java-client-0.0.1.jar
surefire-reports/ola.*.txt \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the whitespace on these three lines, it should all be spaces, not tabs, so they're aligned equally with the lines above and below.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

surefire-reports/TEST-*.xml \
ola-java-client-*.jar

if BUILD_JAVA_LIBS
# .jars aren't really data, but it sure ain't a program.
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ola</groupId>
<artifactId>ola-java-client</artifactId>
<version>0.0.1</version>
<version>0.0.2</version>
<description>Java implementation of OLA RPC</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
12 changes: 12 additions & 0 deletions java/src/main/java/ola/OlaClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ public UniverseInfoReply getUniverseInfo(int universe) {
}


/**
* Get a list of info about all universes.
*
* @return UniverseInfoReply
* @since 0.0.2
*/
public UniverseInfoReply getUniverseList() {
OptionalUniverseRequest request = OptionalUniverseRequest.newBuilder().build();
return (UniverseInfoReply) callRpcMethod("GetUniverseInfo", request);
}


/**
* Get UID's.
*
Expand Down
7 changes: 7 additions & 0 deletions java/src/test/java/ola/OlaClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ public void testGetUniverseInfo() {
System.out.println(reply);
}

@Test
public void testGetUniverseList() {
UniverseInfoReply reply = client.getUniverseList();
assertNotNull(reply);
System.out.println(reply);
}

@Test
public void testGetUIDs() {
UIDListReply reply = client.getUIDs(0);
Expand Down