Norman Maurer
b6dd5938ab
No need to do any deadlock check here
2013-03-21 11:24:26 +01:00
Trustin Lee
c08919d0a0
Fix the dead lock described in #1175
...
- Similar to @normanmaurer's fix in that this commit also makes Bootstrap.init(Channel) asynchronous, but it is simpler and less invasive.
- Also made sure a connection attempt failure in the local transport does not trigger an exceptionCaught event
2013-03-21 19:19:14 +09:00
Trustin Lee
bd8d53eaed
Fix checkstyle
2013-03-21 19:02:34 +09:00
Trustin Lee
2aa0bf73dc
Add a unit test that reproduces the dead lock described in #1175
...
- The offending test case is annotated with `@Ignore`
- Also fixed a bug where channel initialization failure swallows the original cause of initialization failure
2013-03-21 18:43:03 +09:00
Trustin Lee
a980638190
Ensure the best effort is made even if future listeners could not be notified / Handle registration failure in a robust manner
...
- Related: #1187
2013-03-21 17:48:10 +09:00
Trustin Lee
8b722d29a7
Add constructor parameters that do not perform type parameter auto-detection for the languages without type parameters
...
- Fixes #1177
- Add TypeParameterMatcher.get(parameterType)
- Add alternative constructors
2013-03-21 16:11:47 +09:00
Norman Maurer
2b014ce82a
[ #1183 ] Fix BlockingOperationException in ChannelGroup.close().awaitUninterruptibly()
2013-03-20 18:28:55 +01:00
Norman Maurer
ce87b627be
Let EventExecutor return our Future to allow the user to work also with FutureListener here. Also add a special ScheduledFuture that extends our Future for this purpose.
2013-03-19 10:45:42 +01:00
Michael Nitschinger
5a88227856
Transport: Clarifying the role of AbstractBootstrap#bind()
...
This small changeset clarifies the role of AbstractBootstrap#bind(),
especially when not used in a ServerBoostrap context.
2013-03-18 17:58:46 +09:00
Trustin Lee
f4c18c6e74
Fix a bug where NioEventLoop.processSelectedKeys() enters an infinite loop when too many connections are closed at once
...
- Fixes #1171
2013-03-18 15:01:19 +09:00
Jeff Pinner
7498e0f913
make deregister protected in ThreadPerChannelEventLoop
2013-03-17 20:11:33 +01:00
Trustin Lee
2a87950784
[maven-release-plugin] prepare for next development iteration
2013-03-16 18:41:36 +09:00
Trustin Lee
adfb29330b
[maven-release-plugin] prepare release netty-4.0.0.Beta3
2013-03-16 18:40:59 +09:00
ursa
835a40fa25
Port test for handler's life-cycle processing into master branch.
2013-03-14 11:10:02 +01:00
Trustin Lee
70a51bcd8d
Fix memory leak in AbstractEmbeddedChannel
...
- Allow a transport implementation to perform an arbitrary task when a channel has been deregistered completely
2013-03-14 15:51:33 +09:00
Trustin Lee
9c96791176
Move the methods that's only used by DefaultChannelPipeline to DefaultChannelPipeline
2013-03-14 15:01:35 +09:00
Trustin Lee
d55567e21b
Remove DefaultChannelHandlerContext.needsLazyBufInit which is used only by the head handler
2013-03-14 14:35:56 +09:00
Trustin Lee
f1ecb4ab1a
Remove ChannelHandlerContext.types() which is barely useful / Remove ChannelHandlerType together
2013-03-14 14:14:04 +09:00
Trustin Lee
9feb27d58c
Specify timeout on Selector.select()
2013-03-14 08:54:33 +09:00
Trustin Lee
644d5abbda
Add an empty line
2013-03-14 06:54:57 +09:00
Trustin Lee
8dcb1387e3
Add I/O ratio parameter to NioEventLoop
...
- Add SingleThreadEventExecutor.runAllTasks(timeout)
- Add NioEventLoop.ioRatio property
- Merge SelectorUtil into NioEventLoop
2013-03-14 06:49:08 +09:00
Norman Maurer
fe66f33f42
Fix issue where the bytes/messages are forwarded to the wrong handler
2013-03-12 08:37:27 +01:00
Norman Maurer
17ebbdec20
Let ChannelGroupFuture extends ChannelFuture and ChannelGroupFutureListener GenericFutureListener
2013-03-12 08:35:39 +01:00
Norman Maurer
f2a35273e6
Fix checkstype
2013-03-12 08:35:24 +01:00
Trustin Lee
397830d238
Allow SingleOutboundMessageHandler.beginFlush() to reject the flush request by returning false / Replace PartialFlushException with IncompleteFlushException which is more correct.
2013-03-12 15:20:46 +09:00
Trustin Lee
83cdbeca1d
Add ThreadPerChannelEventLoopGroup and ThreadPerChannelEventLoop to enable a user to write a new thread-per-channel transport easily
...
- Fixes #1124
2013-03-12 14:50:38 +09:00
Norman Maurer
2406a9f8b8
Use LinkedHashSet
2013-03-11 06:38:39 +01:00
Norman Maurer
806e9b1f8c
Make sure we handle outbound messages of type ByteBuf special
2013-03-11 08:59:00 +09:00
Norman Maurer
0a1bc86569
Javadocs cleanup / added
2013-03-10 21:07:19 +01:00
Norman Maurer
0504a442ae
Check for NPE and also optimze HashSet allocation
2013-03-10 21:06:59 +01:00
Norman Maurer
fcd6becad9
[ #1136 ] Fix possible IllegalBufferAccessException when remove itself from the pipeline
2013-03-08 21:55:46 +01:00
Norman Maurer
7b4c83b462
[ #1135 ] Fix endless loop which will get triggered when an exception is thrown during freeHandlerBuffersAfterRemoval
2013-03-08 21:41:59 +01:00
Norman Maurer
fd3f923b52
Allow to specify the used buffer type for ChannelInboundByteBufHandler and ChannelOutboundByteBufHandler by configuration. As default it tries to use a direct ByteBuf
2013-03-08 08:20:46 +01:00
Trustin Lee
a9a29bdf3f
Use I/O buffer whenever possible now that our direct buffers are as fast as heap buffers
2013-03-08 11:21:08 +09:00
Trustin Lee
16f4de7adb
Use the original stack trace when translating SocketTimeoutException to ConnectTimeoutException
2013-03-08 08:40:28 +09:00
Norman Maurer
61d6c48365
[ #1036 ] Add special ConnectTimeoutException which is thrown if a connection failed because of a timeout
2013-03-07 20:53:45 +01:00
Norman Maurer
9599bfd569
Fix class-cast exception which is a regression introduces in 256c931db2
2013-03-07 11:11:37 +01:00
Trustin Lee
526dafca75
Fix checkstyle
2013-03-07 16:13:44 +09:00
Norman Maurer
88cc8c1739
[ #1065 ] Provide Future/Promise without channel reference
2013-03-07 07:21:37 +01:00
Trustin Lee
148abe52f9
Reduce the amount of memory used for handler names
...
- Fixes #1123
2013-03-07 12:43:16 +09:00
Trustin Lee
1c1570ffc4
Make field access via ByteBuf.read/write*() faster by avoiding unnecessary boundary checks
...
- also disabled a time consuming test that is actually a regression test
2013-03-06 10:32:29 +09:00
Trustin Lee
6e5bb87219
Re-enable some critical tests
2013-03-05 18:42:34 +09:00
Trustin Lee
a8a7c4f576
Provide a way to implement an ChannelInbound/OutboundMessageHandler conveniently without extending an adapter class
...
- Add ChannelHandlerUtil and move the core logic of ChannelInbound/OutboundMessageHandler to ChannelHandlerUtil
- Add ChannelHandlerUtil.SingleInbound/OutboundMessageHandler and make ChannelInbound/OutboundMessageHandlerAdapter implement them. This is a backward incompatible change because it forces all handler methods to be public (was protected previously)
- Fixes : #1119
2013-03-05 17:27:53 +09:00
Norman Maurer
256c931db2
Move exceptionCaught(..) back to ChannelHandler. Related to [ #1118 ]
2013-03-05 07:34:34 +01:00
Trustin Lee
e4aa941bd4
Simplify ChannelInboundMessageHandlerAdapter.inboundBufferUpdated() implementation
2013-03-05 12:22:57 +09:00
Trustin Lee
0e3825899a
Move DefaultChannelPipeline.notifyHandlerException() to DefaultChannelHandlerContext / Always trigger exceptionCaught() at the handler that raised an exception
...
- Related: #1118
2013-03-05 12:13:14 +09:00
Norman Maurer
1603d9792d
Move methods from ChannelHandler to ChannelStateHandler like proposed in [ #1107 ]
2013-03-04 07:28:10 +01:00
Norman Maurer
3ac78b030a
Improve javadocs
2013-03-01 22:30:45 +01:00
Norman Maurer
03525f4b64
Fix javadocs
2013-03-01 21:42:08 +01:00
Norman Maurer
cb202da832
[ #1036 ] Use SocketTimeoutException when a connection timeout is detected to make it easier to detect timeout vs refused
2013-02-27 10:19:26 +01:00