You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-dev@xml.apache.org by Andrew Evers <ae...@redwood.nl> on 2002/09/13 16:37:45 UTC
PATCH: Add Context handling to server
Hi guys,
Here is the patch I hinted at in my previous mail. It allows a
context object to be passed around from an entry-point in
XmlRpcServer/Worker through to the actual handlerimplementation (if the handler supports it).
The advantage of this patch (IMHO) is that it separates out the
XML-RPC request itself from the context in which it occured. By
'context' I mean the HTTP connection (which may be re-used), the
headers and authentication information (SSL info...). Information
may now be passed through from a custom embedding application to
that application's handlers.
This can be passed in from the calling framework and used by
special XmlRpcWorker implementations, or by special handler
implementations. It also opens the way for an XmlRpcWorker
that is based on a chain or filter system.
The new context related classes are as follows:
+ XmlRpcContext - an interface containing the context for the
request. Currently the username/password and the handler
mapping (used by system handlers).
+ DefaultXmlRpcContext - default implementation - nothing
exciting.
+ ContextXmlRpcHandler - an XML-RPC handler that is capable
of handling a request that contains context information.
+ MultiCall.java - the system.multicall handler, factored
out of SystemHandler.
Changes to XmlRpcRequest:
Move username/password to XmlRpcContext.
Changes to XmlRpcServer,XmlRpcWorker:
Context is passed or created in various execute() methods (the
old entry-points are preserved).
Changes to XmlRpcWorker,DefaultHandlerMapping:
Add support for ContextXmlRpcHandler in the mapping list.
Other changes:
XmlRpcServer:
There is now a createWorker() called by getWorker() in
place of constructing an XmlRpcWorker itself. This could
be patched in separately.
SystemHandler/MultiCall:
The SystemHandler has been changed, in particular it is now
a multiplexor, and the handlers themselves are in separate
classes. The SystemHandler and its sub-handlers all implement
ContextXmlRpcHandler instead of using introspection, this
allows them to obtain context information (esp. information
about server state).
The inclusion of system.* handlers may now be done by the
embedding developer.
Ideally SystemHandler and MultiCall would move to a
separate package (org.apache.xmlrpc.system?).
Andrew.
Re: PATCH: Add Context handling to server
Posted by josh lucas <jo...@stonecottage.com>.
On Friday, September 13, 2002, at 07:55 AM, Ryan Hoegg wrote:
> Hi Andrew, (and future posters)
>
> I think it is more appropriate to submit the patches through Bugzilla
> at http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=XML-RPC
>
> Creating an account is painless.
>
> As usual, the committers know best so please correct me if I'm wrong.
>
I just believe it is easier to keep track of things if there is a bug #
related to it.
I plan on looking at this and all the other patches this weekend.
Perhaps sooner, just depends on the day job..
thanks,
josh
Re: PATCH: Add Context handling to server
Posted by josh lucas <jo...@stonecottage.com>.
On Friday, September 13, 2002, at 07:55 AM, Ryan Hoegg wrote:
> Hi Andrew, (and future posters)
>
> I think it is more appropriate to submit the patches through Bugzilla
> at http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=XML-RPC
>
> Creating an account is painless.
>
> As usual, the committers know best so please correct me if I'm wrong.
>
I just believe it is easier to keep track of things if there is a bug #
related to it.
I plan on looking at this and all the other patches this weekend.
Perhaps sooner, just depends on the day job..
thanks,
josh
Re: PATCH: Add Context handling to server
Posted by Ryan Hoegg <rh...@isisnetworks.net>.
Hi Andrew, (and future posters)
I think it is more appropriate to submit the patches through Bugzilla at
http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=XML-RPC
Creating an account is painless.
As usual, the committers know best so please correct me if I'm wrong.
Ryan Hoegg
ISIS Networks
Re: PATCH: Add Context handling to server
Posted by Ryan Hoegg <rh...@isisnetworks.net>.
Hi Andrew, (and future posters)
I think it is more appropriate to submit the patches through Bugzilla at
http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=XML-RPC
Creating an account is painless.
As usual, the committers know best so please correct me if I'm wrong.
Ryan Hoegg
ISIS Networks