-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Interface to provide own implementation for data transport #72
Comments
Thanks for this detailed feature request. I had a closer look at the code, and it appears that half of the code is dealing with the xmlrpc protocol, and the other half is dealing with http. Rather than trying to decouple the code in In practice, instead of
you could do something like:
(I haven't actually tested it, so don't hesitate to mention if it doesn't work out of the box). It seems to me the overhead is minimal, and that way, I don't have to guess which interface would be the most future proof. (also: you mentioned that this feature could fit in axmlrpc V2. But actually this version has been started by timroes, but it's likely it will never be completed. See #49 for more infos) |
Looks promising, but Continuing this minimal solution you proposed, there could be an |
Oh, indeed. I didn't pay attention to the visibility of this class.
It shouldn't be too hard, but I'm afraid I won't have time to work on it before at least the end of the month. (If you're in a hurry, you may push a pull request though) |
If you vote for making that class public, please notice this minimal usage in the |
I tried to create a class which would accept some kind of I didn't really tested it, so please let me know if it actually works, so that I can make a new release, and feel free to re-open this issue if it doesn't work as expected |
Sadly, I was unable to try out with unix sockets, but it works flawlessly with public interface IXMLRPCClientTransport {
OutputStream getOutputStream();
InputStream getInputStream();
} Thanks! 👍 |
I just pushed axmlrpc v1.11.0 on maven central. It contains this patch. |
I was able to try out |
As an
aXMLRPC
user I would like to use my own data transport implementation.It would be nice if there will be an
XMLRPCStream
interface which provides the neededInputStream
andOutputStream
.With this in mind,
aXMLRPC
's current functionality could be achieved by providing a default implementation ofXMLRPCHTTPStream
interface which extendsXMLRPCStream
.With the help of
XMLRPCStream
interface and a unix socket library an user could useaXMLRPC
through unix domain sockets.The
XMLRPCHTTPStream
interface could help users to use their own HTTP implementation and also let changes to the default HTTP implementation happen easier, like theOkHttp
change in #62 .The text was updated successfully, but these errors were encountered: