quilt icon indicating copy to clipboard operation
quilt copied to clipboard

OutgoingUrl, OkHttpClient and BearerTokenSupplier should be not be required for incoming-only IlpOverHttpLinks

Open nhartner opened this issue 6 years ago • 0 comments

IlpOverHttpLink constructor requires both outgoingUrl and bearerTokenSupplier parameters. This should only be required if the IlpOverHttpLink needs to send packets. It should not be required for an incoming-only IlpOverHttpLink.

Consider moving OutgoingUrl, OkHttpClient and BearerTokenSupplier into an OutgoingConnectionSupplier class which uses these fields to construct an http connection. IlpOverHttpLink constructor should have an optional OutgoingConnectionSupplier parameter. If IlpOverHttpLink#sendPacket is invoked, only then will OutgoingConnectionSupplier be required.

nhartner avatar Jan 03 '20 01:01 nhartner