Commit Graph

2779 Commits

Author SHA1 Message Date
Trustin Lee
470e7da5d7 Add MultithreadEventLoop
- Add EventLoopException to wrap the exceptions while an event loop does
something
- Make EventLoop.register() return EventLoop so that the caller knows
the actual EventLoop that will handle the Channel even if the caller
called register() from MultithreadEventLoop
2012-04-29 18:40:55 +09:00
Trustin Lee
e76e2aeac8 Add missing @Override annotation 2012-04-29 17:59:42 +09:00
Trustin Lee
cdd1ba93f0 Second round of new channel handler API design
- Rename ChannelReader to ChannelInboundHandler
- Rename ChannelWriter to ChannelOutboundHandler
- Introduce ChannelBufferHolder instead of adding the common super type
  of message buffers and byte buffers
  - This is more type-safe and natural.
- Remove the notification methods for buffer closure (might add back
  later when revisiting half-closed connection support)
2012-04-29 17:53:50 +09:00
Trustin Lee
c7bd0b41e6 Remove unnecessary parameter 2012-04-12 17:54:56 +09:00
Trustin Lee
22a815eaf8 Revamp channel handler API
- Merged LifeCycleAwareChannelHandler into ChannelHandler
- Replaced ChannelUpstreamHandler and ChannelDownstreamHandler with
  ChannelReader and ChannelWriter
  - These two new interfaces are much more type-safe than its ancestor.
- Simplified channel state model as described in #68
- Handler creates send/receive buffer.
  - Previously, Netty created them, but it led to more memory copies and
    inflexibility.  I'm going to allow a handler to create a bounded
    queue for example.
  - It currently uses Queue<T> but I'll define a new interface and make
    ChannelBuffer implement it (e.g. Queue<Byte>)
- Introduced AttributeMap which replaces attachments in Channel and
  ChannelHandlerContext and ChannelLocal
2012-04-12 17:39:01 +09:00
norman
05204025cc Fix regression in Zlib which was introduced while refactoring the code. See #255 2012-04-11 10:55:04 +02:00
norman
97561315fd Add final keyword 2012-04-11 10:54:53 +02:00
norman
16c625cfd0 Allow to share a WorkerPool for boss and worker threads but also allow to have them separate. See #240 2012-04-11 10:54:41 +02:00
norman
f88cd3120d Fix a bug which lead to only use two threads for all tasks all the time, even if the WorkerPool contained more. See #240 2012-04-11 10:54:27 +02:00
norman
4c0a5886ca Make sure multicast tests pass on all os'es 2012-04-11 10:54:14 +02:00
norman
d0f432b4d4 Accept all ready sockets for the SelectionKey. See #240 2012-04-10 11:20:23 +02:00
norman
5434bd9645 Add missing license header 2012-04-10 10:05:33 +02:00
norman
f3456ce098 Make sure multicast tests pass on all os'es 2012-04-10 08:20:58 +02:00
norman
32f61ed01a Fix a NPE in a testcase when running via ubuntu 2012-04-10 08:19:16 +02:00
Norman Maurer
07ff3d76cd Await for close of the channels. See #235 2012-04-10 08:17:38 +02:00
Norman Maurer
019d942a28 Correct javadoc. See #235 2012-04-10 08:17:21 +02:00
Norman Maurer
7eaf635059 Take care of releasing the local channel when releaseExternalResources() is called. See #235 2012-04-10 08:16:58 +02:00
Norman Maurer
a847ec1d88 Add test case to show that issue #235 is due some incorrect usage 2012-04-10 08:16:40 +02:00
vibul
91dc8efd4b Issue #250. Implement web socket close frame status code and reason text. 2012-04-10 08:15:24 +02:00
Norman Maurer
33c085b9b9 Make sure Future get notified before event is fired. See #254 2012-04-07 22:03:58 +02:00
norman
db87c6ea37 Make sure Channel connected event is not fired on connect failure. See #249 2012-04-04 07:41:38 +02:00
Trustin Lee
049fb35bc1 Add Channel.deregister() 2012-04-03 22:29:26 +09:00
Trustin Lee
5a63cc4e1a Allow specifying a non-default SelectorProvider 2012-04-03 22:25:01 +09:00
Trustin Lee
a8647d6dc8 AbstractNioWorker -> SelectorEventLoop 2012-04-03 22:21:11 +09:00
Trustin Lee
0d8afa7a4c attach -> register 2012-04-03 22:19:35 +09:00
Trustin Lee
116054a364 Initial incomplete checkin of the event loop API 2012-04-03 22:03:04 +09:00
norman
d66cf2cbfa Add missing license header 2012-04-03 12:06:09 +02:00
norman
805270c5d9 Finish support for UDP Multicast in UDP. See #216 2012-04-03 12:04:33 +02:00
norman
31e3530252 Fix typo 2012-04-03 07:50:15 +02:00
Norman Maurer
9c1f3c6fe8 Fix UDP nio impl and add simple tests 2012-04-02 21:02:41 +02:00
Norman Maurer
dd6069c681 Fix broken UDP support. This got broken in 3.4.0.Alpha1 2012-04-02 19:37:28 +02:00
norman
023227917f cleanup 2012-04-02 15:27:40 +02:00
norman
221a77409a Only use the source address to join a multicast group if it was specified. See #216 2012-04-02 15:25:40 +02:00
norman
7f8408065b Fix UDP Multicast writes. See #237 2012-04-02 14:22:13 +02:00
norman
b350e8d289 Fix UDP Multicast writes. See #237 2012-04-02 14:20:40 +02:00
norman
9b90e3191a Finish support of NIO UDP multicast. This also change the methods to
return a ChannelFuture. See #216
2012-04-02 11:57:32 +02:00
norman
72f9f502bb Add support for UDP multicast in NIO. See #216
Add some javadocs. See #216

Use the correct key to lookup MembershipKey. See #216
2012-04-02 11:14:31 +02:00
norman
373c356067 Merge branch 'sctp_refactoring'
Conflicts:
	transport/src/main/java/io/netty/channel/socket/nio/NioWorker.java
2012-04-02 11:02:54 +02:00
norman
76c841bd4e Remove non-used class 2012-04-02 07:44:07 +02:00
norman
27836b6436 Add some package-info.java 2012-04-02 07:43:50 +02:00
norman
73bdaa113a Use jUnit Assume to "ignore" SCTP tests on non-unix operation systems 2012-04-02 07:35:42 +02:00
norman
4eac8f6b70 Use jUnit Assume to "ignore" SCTP tests on non-unix operation systems 2012-04-02 07:34:15 +02:00
Norman Maurer
7dc2d8eb77 Make sure all resources are disposed before try to shutdown executor 2012-04-01 20:56:13 +02:00
Norman Maurer
f135804b9b Correct set blocking mode on server channel 2012-03-30 22:16:18 +02:00
Norman Maurer
8eb3a30bd4 Fix NPE 2012-03-30 22:07:27 +02:00
Norman Maurer
c83fb3a3f0 Correct handle interestedOps changes in Sctp 2012-03-30 21:59:48 +02:00
Norman Maurer
a2701a9ae4 Exclude com.sun.nio.* from the generated jar 2012-03-30 21:57:15 +02:00
Norman Maurer
8e9058e921 Enable/Disable sctp tests based on the detected OS 2012-03-30 21:57:01 +02:00
Norman Maurer
c02d38a728 :Correctly handle interestedOps changes 2012-03-30 21:56:46 +02:00
Norman Maurer
3decdeb0b0 Exclude com.sun.nio.* from the generated jar 2012-03-30 21:54:25 +02:00