Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Design Question about IServiceHandler
Design Question about IServiceHandler [message #933700] Fri, 05 October 2012 08:56 Go to next message
Christian Schwarz is currently offline Christian Schwarz
Messages: 31
Registered: July 2009
Member
I am currently implementing my first org.eclipse.rwt.service.IServiceHandler. I wonder why IServiceHandler#service() takes no HttpServlerRequest/Response arguments, instead one have to call the static RWT.getRequest() and RWT.getResponse(). To me it smells bad, who prevent me to call these static methods anywhere else in my code, and what is the effect? Its also hard to test the IServiceHandler implementation.
Wouldn't IServiceHandler#service(HttpServletRequest,HttpServletResponse) fit better here? Hopefully RAP 2.0 can fix this.

[Updated on: Fri, 05 October 2012 10:55]

Report message to a moderator

Re: Design Question about IServiceHandler [message #936624 is a reply to message #933700] Mon, 08 October 2012 06:51 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1816
Registered: July 2009
Senior Member
Hi Christian,
could you please open an enhancement request with your suggestion?
Thanks,
Ivan

On 10/5/2012 11:56 AM, Christian Schwarz wrote:
> I am currently implementing my first
> org.eclipse.rwt.service.IServiceHandler. I wonder why
> IServiceHandler#service() takes no HttpServlerRequest/Response
> arguments. Instead one have to call the static RWT.getRequest() and
> RWT.getResponse(). To me it smells bad, who prevent me to call these
> static methods anywhere else in my code, and what is the effect?
> Wouldn't
> IServiceHandler#service(HttpServletRequest,HttpServletResponse) fit
> better here? Hopefully RAP 2.0 can fix this.

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Design Question about IServiceHandler [message #936669 is a reply to message #933700] Mon, 08 October 2012 07:58 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf Sternberg
Messages: 1290
Registered: July 2009
Senior Member

Hi Christian,

IServiceHandler is a pretty old interface and I completely agree with
your criticism. But instead of changing this interface, I would prefer
to deprecate it and to allow registering real Servlets instead. At any
rate, an enhancement request would be good.

Best regards,
Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Design Question about IServiceHandler [message #936946 is a reply to message #936669] Mon, 08 October 2012 14:03 Go to previous message
Christian Schwarz is currently offline Christian Schwarz
Messages: 31
Registered: July 2009
Member
I've opened a enhancement request: https://bugs.eclipse.org/bugs/show_bug.cgi?id=391353
Previous Topic:Java-Version of WAR product
Next Topic:RAP 1.5 GUI testing
Goto Forum:
  


Current Time: Sun Sep 21 16:17:09 GMT 2014

Powered by FUDForum. Page generated in 0.02474 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software