Fork me on GitHub
#aleph
<
2018-12-11
>
rborer08:12:30

right, I'll send an email to aleph google groups so his answer is saved for posterity (on Slack the information will disappear after a few days, and on Twitter, well, it's not the most easily searchable 😉 )

valerauko15:12:29

is there a representation of aleph that implements CloseableHttpClient?

valerauko15:12:45

i'd need to pass an object like that to another java lib

kachayev20:12:14

@vale Do you mean aleph http client? server object implements Closeable, but for the client it’s a bit different… there’s actually no such thing as “client”. you have a connection pool (created by you or default one) which is represented as flow/instrumented-pool. you can probably try to extract a list of open connections to close them when necessary

valerauko04:12:10

i'm not sure if i actually need to close them either... there's a library that uses the apache commons http client internally, but if possible i'd prefer not to have another http dependency if i can just use aleph already.

kachayev12:12:28

In that case you need not simply Closable, you need an instance of https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/client/CloseableHttpClient.html (or an instance of subclass). You can use reify to define execute methods, but as far as I understand… all of those methods are supposed to be blocking, right?

kachayev20:12:50

In that case you probably won’t see any advantages of using Aleph