Skip to content

Commit 8046688

Browse files
make armada client autocloseable (#10)
1 parent 1ac7db7 commit 8046688

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>io.armadaproject</groupId>
77
<artifactId>java-client</artifactId>
8-
<version>0.0.1</version>
8+
<version>0.0.2</version>
99
<packaging>jar</packaging>
1010
<description>Java client library for the Armada project</description>
1111
<name>java-client</name>

src/main/java/io/armadaproject/ArmadaClient.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import io.grpc.stub.MetadataUtils;
2525
import java.util.Iterator;
2626

27-
public class ArmadaClient {
27+
public class ArmadaClient implements AutoCloseable {
2828

2929
private final ManagedChannel channel;
3030

@@ -84,4 +84,9 @@ public JobStatusResponse getJobStatus(JobStatusRequest jobStatusRequest) {
8484
return jobsBlockingStub.getJobStatus(jobStatusRequest);
8585
}
8686

87+
@Override
88+
public void close() throws Exception {
89+
channel.shutdown();
90+
}
91+
8792
}

0 commit comments

Comments
 (0)