Norman Maurer
d8387fa4c3
[ #858 ] Merge ChannelPipeline.replaceAndForward into replace and removeAndForward into remove
2013-04-13 18:19:33 +02:00
Trustin Lee
4a792151b0
Rewrite bridge implementation in DefaultChannelHandlerContext
...
This commit splits bridge into two parts. One is NextBridgeFeeder,
which provides ByteBuf and MessageBuf that are local to the context
whose next*Buffer() has been invoked on. The other is a thread-safe
queue that stores the data fed by NextBridgeFeeder.feed().
By splitting the bridge into the two parts, the data pushed by a handler
is not lost anymore when the next handler who provided the next buffer
is removed from the pipeline.
- Fixes #1272
2013-04-12 17:38:04 +09:00
Trustin Lee
5bfb408b7d
Add setRefCnt(int) method to AbstractReferenceCounted(ByteBuf)
...
- Fixes #1265
2013-04-11 19:36:27 +09:00
Trustin Lee
2600f46fd7
Fix checkstyle
2013-04-11 17:54:20 +09:00
Trustin Lee
15ac4127e4
Remove @Ignore and add expected / Fix inspector warnings
2013-04-11 17:29:37 +09:00
Trustin Lee
e556232aeb
Rename HandshakeCompletionEvent to SslHandshakeCompletionEvent
2013-04-11 16:50:42 +09:00
Norman Maurer
b3429af1cc
[ #1260 ] Fire a HandshakeCompletationEvent once the SSL handshake completes
2013-04-11 06:47:43 +02:00
Norman Maurer
725156f082
[ #1242 ] Fix infinity-loop which was triggered when a write failed and AioSocketChannel was used
2013-04-10 15:39:58 +02:00
Norman Maurer
3b8673733e
[ #1262 ] Respect adjustment when using SlicedByteBuf.nioBuffers()
2013-04-10 14:19:03 +02:00
Norman Maurer
4746e74124
[ #1247 ] Add javadocs which tell the limitation of the type detection as there is nothing we can do about
2013-04-10 11:27:54 +02:00
Norman Maurer
73db1f886d
[ #1247 ] Add test which shows the problem with concrete classes that pass in the type based on a generic
2013-04-10 07:08:42 +02:00
Trustin Lee
e8ee6a2772
Better exception message when tickDuration is too big
...
- Related: #1246
- Fix misc inspector warnings
2013-04-10 13:44:05 +09:00
Trustin Lee
b58e6787ee
Fix typo
2013-04-10 10:41:23 +09:00
Norman Maurer
da174f4290
Add a warning about SingleThreadEventExecutor.pendingTasks() operation
2013-04-09 12:50:29 +02:00
Norman Maurer
0efebd5a82
Allow to get an Iterator over all of the EventExecutor an EventExecutorGroup contains. Beside this allow to get basic stats for the EventExecutor like pendingTasks and executorCount
2013-04-09 15:45:18 +09:00
Norman Maurer
067a2af700
Fix a few typos
2013-04-08 21:23:53 +02:00
Norman Maurer
60cfb547b4
Fix logging of android platform detection
2013-04-08 21:19:20 +02:00
irelandKen
9308625b2c
Update FullHttpMessage.java
...
I think FullHttpMessage = HttpMessage + LastHttpContent,
not that FullHttpMessage = FullHttpMessage + LastHttpContent
2013-04-08 21:12:19 +02:00
Norman Maurer
51de21f250
[ #1246 ] Correctly convert to nanos
2013-04-08 10:42:54 +02:00
Norman Maurer
d34daebeca
[ #1238 ] Correctly log the content of the MessageBuf and not depend on MessageBuf.toString()
...
Add an extra static method to BufUtil which will convert the content of any MessaBuf implementation to a String
2013-04-08 09:45:00 +02:00
Norman Maurer
2a162eb140
Rename method to better reflect usage
2013-04-08 08:06:46 +02:00
Norman Maurer
2508c76e97
[ #1246 ] Fix cpu-spinning regression in HashedWheelTimer
...
Also remove the usage of System.currentTimeMillis() completely here to make it more consistent and correct
2013-04-08 07:01:08 +02:00
Norman Maurer
ded09fc778
No need t let SpdyOrHttpChooser extends ChannelDuplexHandler
2013-04-08 06:45:10 +02:00
Norman Maurer
3305a7df82
Also provide implementation for flush out of the box
2013-04-07 11:54:13 +02:00
Norman Maurer
b36e815026
[ #1241 ] Fix NPE in AbstractTrafficShapingHandler and the logic
2013-04-07 11:02:32 +02:00
Norman Maurer
8632d9011e
[ #1239 ] Fix possible NPE while fail flush futures during close
2013-04-05 19:23:49 +02:00
Trustin Lee
d299eeb485
Fix a bug in AbstractTrafficShapingHandler.getTimeToWait() where it doesn't work OK when system time goes back.
2013-04-05 13:44:51 +09:00
Trustin Lee
7ccbcb90af
Upgrade to netty-build-19
2013-04-05 05:38:24 +09:00
Andrei Pozolotin
a3e760a003
fix #1234 - duplicate package-info.java errors in eclipse requires release of netty-build v 19 and netty-parent update.
2013-04-05 05:38:05 +09:00
Trustin Lee
0ac31ae846
Make Unpooled*ByteBuf public so that ByteBufAllocator implementor can extend it
2013-04-04 17:26:14 +09:00
Trustin Lee
05bc0ba17f
Fix checkstyle
2013-04-04 16:47:10 +09:00
Trustin Lee
6dfa455f9e
Fix compiler warnings
2013-04-04 16:31:41 +09:00
Norman Maurer
4505e7f1b3
Make sure OP_WRITE is correctly cleared when using FileRegion and other NioTasks
2013-04-04 08:38:58 +02:00
Trustin Lee
c03179c81c
Clean up try/catch blocks / Prefer 'throw' to 'fireExceptionCaught'
2013-04-04 15:00:07 +09:00
Trustin Lee
3b9994455a
Saner field order
2013-04-04 14:53:32 +09:00
Trustin Lee
03955428bc
Ensure BufUtil.release() is called even if writeBytes() fails in writeAndRelease()
2013-04-04 14:50:25 +09:00
Trustin Lee
015e60b00f
Clean up catch blocks
...
- No need to have nested try blocks because the catch block catches everything and rethrows it
- No need to do instanceof-checks
2013-04-04 14:48:30 +09:00
Trustin Lee
c25fd78ca0
No need to have nested try blocks
...
.. because the catch block catches everything and rethrows it
2013-04-04 14:44:52 +09:00
Trustin Lee
788b88b7af
Make sure to release the buffer when it's written to the next byte buffer
...
.. otherwise it will leak.
2013-04-04 14:37:54 +09:00
Trustin Lee
46540578fc
Optimize OutputMessageBuf.drainToNextInbound/Outbound()
...
- Return early when the buffer is empty
- Keep only the number of byte buffers
- Remove unnecessary null check in the loop (because we know buffer is not empty at certain point)
2013-04-04 14:32:48 +09:00
Trustin Lee
8a672c2800
Proper assertion instead of blindly clearing the OutputMessageBuf
2013-04-04 14:11:24 +09:00
Norman Maurer
7ee2adb587
Move drain logic to OutputMessageBuf and optimize it as far as possible
2013-04-03 18:52:57 +02:00
Norman Maurer
1675e61f5b
Share same ThreadLocal for all decoder/encoders to minimize memory usage
2013-04-03 18:19:35 +02:00
Norman Maurer
94ef7dc1b9
Optimize to minimize volatile reads to access next buffer in codec framework
2013-04-03 18:03:55 +02:00
Norman Maurer
9828267165
Fix performance regression which was caused by calling the fireInboundBufferUpdated() a way to often
...
* Also use a ThreadLocal for the decoder buffer to safe space as it is cheap
2013-04-03 17:07:52 +02:00
Trustin Lee
c3559ddbda
Fix misleading example in ByteBuf
2013-04-03 22:18:38 +09:00
Trustin Lee
baf9ecfe7b
Fix IndexOutOfBoundsException raised when numHeapArenas and numDirectArenas differ
...
- Fixes #1227
2013-04-03 22:15:34 +09:00
Trustin Lee
8fef511390
Fix typo
2013-04-03 22:08:43 +09:00
Norman Maurer
af4b71a00e
Remove special handling of Object[] in codec framework (a.k.a unfolding)
...
- Fixes #1229
- Primarily written by @normanmaurer and revised by @trustin
This commit removes the notion of unfolding from the codec framework
completely. Unfolding was introduced in Netty 3.x to work around the
shortcoming of the codec framework where encode() and decode() did not
allow generating multiple messages.
Such a shortcoming can be fixed by changing the signature of encode()
and decode() instead of introducing an obscure workaround like
unfolding. Therefore, we changed the signature of them in 4.0.
The change is simple, but backward-incompatible. encode() and decode()
do not return anything. Instead, the codec framework will pass a
MessageBuf<Object> so encode() and decode() can add the generated
messages into the MessageBuf.
2013-04-03 21:44:54 +09:00
Trustin Lee
cd0b5ec2db
Keep Socket/SctpTestPermutation from creating too many event loops
...
- Also made the event loops created by *TestPermutation use daemon threads for simplicity (i.e. no need to shut down the event loops)
2013-04-03 18:06:46 +09:00