[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlrpc-user
Subject:    Re: XmlRpcServlet v3.0 newbie question
From:       "Mark Petrovic" <mspetrovic () gmail ! com>
Date:       2006-04-25 5:09:54
Message-ID: 652b9c0b0604242209k2d59bb95kad91cae1b97cc34c () mail ! gmail ! com
[Download RAW message or body]

What might be interesting is a requirement that the Handler class implement
a proposed "UserHandler interface".  Something like

public interface UserHandler {
   public void init();
}

which would be used in conjunction with another proposed method call on
XmlRpcServlet:

public UserHandler getHandler(String handlerName);

where handlerName is the property value in XmlRpcServlet.properties file.

On 4/23/06, Mark Petrovic <mspetrovic@gmail.com> wrote:
>
> Good day.
>
> A newbie question:
>
> On an arbitrary handler specified in XmlRpcServlet.properties, I would
> like to call an "init"-like method presumed to exist as a member of that
> "Handler" class.
>
> A requirement is that this "init"-like method on the Handler class must b=
e
> called from the XmlRpcServlet's overridden init() method.  Problem is, I
> cannot think of a way to obtain a reference to the Handler instance from
> within the servlet.  I know the Handler instance exists by the time the
> constructor of my implementation of the XmlRpcServlet exits.  But, hmm, h=
ow
> to acquire the Handler instance and call a method on it?
>
> I can restructure my code to work around this problem, namely by making
> the servlet itself the handler, but I'd rather not do that just yet.
>
> Any suggestions are most welcome.  I may be missing something quite
> obvious.
>
> Thanks.
>
> --
> Mark
> AE6RT
>



--
Mark
AE6RT

[Attachment #3 (text/html)]

What might be interesting is a requirement that the Handler class implement a \
proposed &quot;UserHandler interface&quot;.&nbsp; Something like<br><br>public \
interface UserHandler {<br>&nbsp;&nbsp; public void init();<br>}<br><br>which would \
be used in conjunction with another proposed method call on XmlRpcServlet: \
<br><br>public UserHandler getHandler(String handlerName);<br><br>where handlerName \
is the property value in XmlRpcServlet.properties file.<br><br><div><span \
class="gmail_quote">On 4/23/06, <b class="gmail_sendername">Mark Petrovic </b> &lt;<a \
href="mailto:mspetrovic@gmail.com">mspetrovic@gmail.com</a>&gt; \
wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="direction: \
ltr;"> Good day.<br><br>A newbie question:<br><br>On an arbitrary handler specified \
in XmlRpcServlet.properties, I would like to call an &quot;init&quot;-like method \
presumed to exist as a member of that &quot;Handler&quot; class.&nbsp;  <br><br>A \
requirement is that this &quot;init&quot;-like method on the Handler class must be \
called from the XmlRpcServlet's overridden init() method.&nbsp; Problem is, I cannot \
think of a way to obtain a reference to the Handler instance from within the \
servlet.&nbsp; I know the Handler instance exists by the time the constructor of my \
implementation of the XmlRpcServlet exits.&nbsp; But, hmm, how to acquire the Handler \
instance and call a method on it? <br><br>I can restructure my code to work around \
this problem, namely by making the servlet itself the handler, but I'd rather not do \
that just yet.<br><br>Any suggestions are most welcome.&nbsp; I may be missing \
something quite obvious. <br><br>Thanks.<br clear="all"></div><div style="direction: \
ltr;"><span class="sg"><br>-- <br>Mark<br>AE6RT

</span></div></blockquote></div><br><br clear="all"><br>-- <br>Mark<br>AE6RT



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic