How to close ApnsClient?
jackpanz opened this issue · 3 comments
How to close ApnsClient? If you modify the configuration file I want to re-initialize ApnsCilent, so how to close the old?
Which configuration file are you referring to?
final ApnsClient client = new ApnsClientBuilder()
.withProductionGateway()
.inSynchronousMode()
.withCertificate(cert)
.withPassword("")
.withDefaultTopic("<your app's topic>")
.build();
When initialized, I want to change the following parameters.
withDefaultTopic,withProductionGateway,withCertificate
Please see square/okhttp@4de7d7f
You can get the underlying OkHttp client by calling ApnsClient#getHttpClient.
Note: There are different ways to close the client depending on whether you're using the asynchronous version or the synchronous version.