quilt
quilt copied to clipboard
OutgoingUrl, OkHttpClient and BearerTokenSupplier should be not be required for incoming-only IlpOverHttpLinks
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.