129 Commits

Author SHA1 Message Date
Simone Bordet
142a1058ba Rolled back changes where SPDY listeners were notified asynchronously in a different thread.
Since the SPDY API can be fully asynchronous, there is no strict need to introduce this extra
asynchronous layer, although it requires that applications use fully asynchronous API and
never block.

The HTTP layer remains asynchronous (servlets are invoked asynchronously in a different thread).

Eventually, we may introduce a SessionFrameListener.Async interface that allows applications
to be invoked asynchronously in a different thread, but that requires some implementation
magic, in particular to invoke correctly IdleListener callbacks.
2012-03-03 00:23:53 +01:00
Simone Bordet
ef17aede69 Added *.todo to .gitignore. 2012-03-02 16:24:07 +01:00
Simone Bordet
22f0f58062 Implemented support for async HTTP requests over SPDY. 2012-03-02 16:15:01 +01:00
Simone Bordet
94742d3e94 Updated HTTP layer to invoke the application asynchronously. 2012-03-02 11:45:06 +01:00
Simone Bordet
0161f780c9 Updated idle timeout checking.
Now that applications are notified in a different thread, idleness becomes an event
and therefore a new IdleListener interface has been introduced and implemented.
2012-03-01 15:02:35 +01:00
Simone Bordet
e8d09fad53 Updated idle timeout checking.
Now that applications are notified in a different thread, idleness becomes an event
and therefore a new IdleListener interface has been introduced and implemented.
2012-03-01 14:59:30 +01:00
Simone Bordet
49bb4f8e8b Improved notification of Handler methods by catching and logging exceptions,
and by notifying them asynchronously to avoid stack overflows.
2012-03-01 12:57:37 +01:00
Simone Bordet
5f61ffc024 Better choice for direct ByteBuffer size. 2012-03-01 12:56:18 +01:00
Simone Bordet
f4e4effe50 DataInfo javadocs + modified slightly the API for helper methods, passing a boolean telling to read or consume the bytes. 2012-03-01 11:47:51 +01:00
Simone Bordet
f9345bdc84 Made Settings.ID open to unknown codes, and implemented SPDY v3 format. 2012-02-29 11:52:19 +01:00
Simone Bordet
074e8be054 Javadocs clarification on data(). 2012-02-29 11:00:45 +01:00
Simone Bordet
7d7e524385 Improved tests. 2012-02-29 11:00:24 +01:00
Simone Bordet
ae0a155a39 Cosmetics. 2012-02-29 00:47:32 +01:00
Simone Bordet
3b8c6dfd4c Revised exception handling. 2012-02-29 00:43:17 +01:00
Simone Bordet
1238de8a28 Improved test. 2012-02-29 00:33:57 +01:00
Simone Bordet
43623829bc Better toString(). 2012-02-29 00:33:37 +01:00
Simone Bordet
ca9b6ebd2c Moved Session.flush() to ISession: applications do not get any benefit from calling flush(). 2012-02-29 00:33:22 +01:00
Simone Bordet
95ffdd8feb Fixed dispatching of data frames in another thread. 2012-02-29 00:32:33 +01:00
Simone Bordet
9575e8a7d2 Added comment on flow control policy. 2012-02-28 23:47:06 +01:00
Simone Bordet
17bb26f053 Better implementation for flow control.
Now DataInfo has an API for performing 2 distinct operations: reading and consuming.
The WINDOW_UPDATE message is sent only when the bytes are consumed and not
when the application callback returns (possibly without having neither read nor
consumed the bytes).
2012-02-28 23:41:46 +01:00
Simone Bordet
b1ef0e87c9 Reviewed use of StreamException and SessionException. 2012-02-28 17:40:03 +01:00
Simone Bordet
3f1c7aa102 Rethrowing SPDYException in case of stream exception. 2012-02-28 17:09:52 +01:00
Simone Bordet
8392dab7b4 Removed read buffers, since we do not need anymore reentrant parsing because we now call the application in a different thread. 2012-02-28 17:02:23 +01:00
Simone Bordet
50ead5c19c Synchronized the generation and enqueuing of control frames, in order to maintain a correct compression context. 2012-02-28 17:01:30 +01:00
Simone Bordet
980d728502 Implemented asynchronous notifications of frame listener callbacks. 2012-02-28 15:32:51 +01:00
Simone Bordet
0a276ed909 Renamed class. 2012-02-28 12:16:49 +01:00
Simone Bordet
8c209c1f73 Refactored order of parameters. 2012-02-28 12:16:10 +01:00
Simone Bordet
0dbcaff911 Implemented support for async write timeouts. 2012-02-28 11:19:33 +01:00
Simone Bordet
a26ae22e3f Updated API to support async write timeouts. 2012-02-28 09:57:44 +01:00
Simone Bordet
0be2ae4754 Temporary commit. 2012-02-28 09:35:44 +01:00
Simone Bordet
a07a7525ff Fixed ClassCastExceptions. 2012-02-28 09:35:09 +01:00
Simone Bordet
268e8bdbd7 Better closes for SSL. 2012-02-28 09:34:49 +01:00
Simone Bordet
ced68ab29b Implemented execution of HTTP over SPDY requests in their own threads.
The model was such one thread performed the parsing of the SYN requests
and invoked the application.
But if a SYN request was blocked in a servlet, then other SYN requests could
not be parsed because the thread was blocked in the servlet.
With these fixes, now a single thread parses SYN requests, but the application
is invoked in another thread, freeing the first thread that can now parse more
SYN requests.
2012-02-27 21:42:29 +01:00
Simone Bordet
e47b9f1630 Consolidated flush() calls into StandardSession.control() to avoid code duplications. 2012-02-27 21:30:43 +01:00
Simone Bordet
79f739799f Better logging. 2012-02-27 21:26:48 +01:00
Simone Bordet
2b5be71ad2 Javadocs. 2012-02-27 21:26:27 +01:00
Simone Bordet
10d5d4acac Sending GOAWAY when stopping SPDYServerConnector and SPDYClient.Factory. 2012-02-26 00:54:14 +01:00
Simone Bordet
6ed95152dd Removed TODOs. 2012-02-25 22:58:43 +01:00
Simone Bordet
2ce29b740d Implemented synthetic data frames to avoid copying data bytes in case of split frames. 2012-02-25 15:07:03 +01:00
Simone Bordet
d43ac786a8 Removed TODOs about data compression, since it's being dropped from the spec. 2012-02-25 14:23:15 +01:00
Simone Bordet
33fdb32bff Implemented usage of SPDY v3 compression dictionary. 2012-02-24 19:14:58 +01:00
Simone Bordet
34509312f0 Reworked API for settings, to make it simpler and more usable. 2012-02-24 16:52:42 +01:00
Simone Bordet
226b180bfd Renamed inner class: Mapper --> Codes. 2012-02-24 16:52:06 +01:00
Simone Bordet
04f74816b5 Fixed conformance with SPDY v2. 2012-02-24 15:30:47 +01:00
Simone Bordet
3f5a35024e Improved sample webapp, now to be run using mvn jetty:run-forked
and working with out-of-the-box Chromium.
2012-02-24 14:18:50 +01:00
Simone Bordet
2640e80101 Introduced default AsyncConnectionFactory in SPDYServerConnector, to fallback
to a default protocol in case of A) non-SSL connection, and B) no NPN.
2012-02-24 14:17:47 +01:00
Simone Bordet
94d5bccbd3 Removed temporary test. 2012-02-24 00:50:29 +01:00
Simone Bordet
cb1be263c4 Updated to correct version of NPN artifact.
Implemented plain HTTP AsyncConnectionFactory and tested protocol negotiation.
2012-02-24 00:48:26 +01:00
Simone Bordet
7be63d7f76 Simplified Handler by removing the context parameter from failed(). 2012-02-24 00:46:32 +01:00
Simone Bordet
e1e9aa1ad5 Simplified Handler by removing the context parameter from failed(). 2012-02-24 00:45:40 +01:00