Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] ByteBuffers and Jetty?

Hi,

On Tue, May 1, 2012 at 7:25 PM, David Walend <david@xxxxxxxxxx> wrote:
> That's a terrific answer for the immediate project. To justify Jetty long-term I need to show what I'd have to do to access ByteBuffers of incoming data

Why you need to access ByteBuffers of incoming data ?
The incoming data will come via network, so you can't use mapped file
buffers anyway.

> and supply ByteBuffers of outbound data.

Again, the data you're going to supply comes from mapped file buffers
? If so, probably the DefaultServlet can serve the file for you, and
you have to do nothing.
If you need to send files whose path is decided at runtime, there are
a number of techniques in the servlets that allows you to direct the
request back to the DefaultServlet to serve the right file.

> How do I draw ByteBuffers out of an HttpRequest?
>
> How do I push ByteBuffers into an HttpResponse?
>
> In Request, it looks like Jetty can supply its own ByteBuffers in setAttribute(), but it doesn't look like API I should use. It looks like the ByteBuffers are just under the skin, maybe in AbstractHttpConnection, but I'm hesitant to use them without seeing them in some sort of obviously long-lived API. It won't be in the servlet API standard, but is there something in Jetty that I can count on not changing release to release?
>

Using ByteBuffers like you explained is a solution, but perhaps if you
explain better the problem, we can suggest alternative solutions that
fit your problem better.

Simon
-- 
http://cometd.org
http://intalio.com
http://bordet.blogspot.com
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz


Back to the top