22
33import io .github .protocol .pulsar .admin .api .Configuration ;
44
5+ import java .io .IOException ;
6+
57public class PulsarAdminImpl implements PulsarAdmin {
68
79 private final Clusters clusters ;
@@ -16,14 +18,16 @@ public class PulsarAdminImpl implements PulsarAdmin {
1618
1719 private final NonPersistentTopics nonPersistentTopics ;
1820
21+ private final InnerHttpClient innerHttpClient ;
22+
1923 PulsarAdminImpl (Configuration conf ) {
20- InnerHttpClient innerHttpClient = new InnerHttpClient (conf );
21- this .clusters = new Clusters (innerHttpClient );
22- this .brokers = new Brokers (innerHttpClient );
23- this .tenants = new Tenants (innerHttpClient );
24- this .namespaces = new Namespaces (innerHttpClient );
25- this .persistentTopics = new PersistentTopics (innerHttpClient );
26- this .nonPersistentTopics = new NonPersistentTopics (innerHttpClient );
24+ this . innerHttpClient = new InnerHttpClient (conf );
25+ this .clusters = new Clusters (this . innerHttpClient );
26+ this .brokers = new Brokers (this . innerHttpClient );
27+ this .tenants = new Tenants (this . innerHttpClient );
28+ this .namespaces = new Namespaces (this . innerHttpClient );
29+ this .persistentTopics = new PersistentTopics (this . innerHttpClient );
30+ this .nonPersistentTopics = new NonPersistentTopics (this . innerHttpClient );
2731 }
2832
2933 @ Override
@@ -55,4 +59,9 @@ public PersistentTopics persistentTopics() {
5559 public NonPersistentTopics nonPersistentTopics () {
5660 return nonPersistentTopics ;
5761 }
62+
63+ @ Override
64+ public void close () throws IOException {
65+ this .innerHttpClient .close ();
66+ }
5867}
0 commit comments