How to handle request / response
Jonathan Arnold
jdarnold at buddydog.org
Fri Jul 8 09:15:38 EDT 2011
I'm a fairly inexperience Java programmer new to Netty and was
wondering what the "standard practice" is when it comes to handling
specific responses to specific requests.
In my case, I am doing RTSP requests to a server and I need to do
specific things based upon the actual request. So when I do a SETUP, I
need to get some information out of the response and then do other
things.
In a more general case, say I'm writing an app the uses a RESTful
interface. I request some information that comes back in, say, XML and
I want to process it in a special way.
How do I set up a handler for a response to a specific request? Is this
what the "event model" mentioned in the docs is used for? If so, I need
a little more information.
Or do I add another filter handler? Have some kind of callback? Use a
special response handler for each request?
Some real world source code examples would be great. The http examples
in the Netty code don't deal with this case. They are either one shots
or don't really do anything with the responses.
TIA.
--
Jonathan Arnold Webstream: http://hieronymus.soup.io
Talent wins games, but team work and intelligence wins championships.
Michael Jordan
More information about the netty-users
mailing list