Commit Graph

25 Commits

Author SHA1 Message Date
Tibor Csögör
6e840d8e62 trivial javadoc fixes
- fix the formatting of the diagram in ChannelFuture's javadoc
- update external link in AutobahnServer
- fix various spelling issues
2016-03-16 20:18:29 +01:00
Norman Maurer
217fb0de05 [#2618] Introduce ChannelPromise.unvoid() and ChannelFuture.isVoid()
Motivation:

There is no way for a ChannelHandler to check if the passed in ChannelPromise for a write(...) call is a VoidChannelPromise. This is a problem as some handlers need to add listeners to the ChannelPromise which is not possible in the case of a VoidChannelPromise.

Modification:

- Introduce ChannelFuture.isVoid() which will return true if it is not possible to add listeners or wait on the result.
- Add ChannelPromise.unvoid() which allows to create a ChannelFuture out of a void ChannelFuture which supports all the operations.

Result:

It's now easy to write ChannelHandler implementations which also works when a void ChannelPromise is used.
2014-07-03 14:17:12 +02:00
Trustin Lee
db3709e652 Synchronized between 4.1 and master
Motivation:

4 and 5 were diverged long time ago and we recently reverted some of the
early commits in master.  We must make sure 4.1 and master are not very
different now.

Modification:

Fix found differences

Result:

4.1 and master got closer.
2014-04-25 00:38:02 +09:00
Norman Maurer
32deb2c22b [#1785] Fix incorrect javadocs 2013-08-27 06:55:14 +02:00
Trustin Lee
26e9d70457 Remove channelReadSuspended / Rename messageReceived(Last) to channelRead(Complete)
- Remove channelReadSuspended because it's actually same with messageReceivedLast
- Rename messageReceived to channelRead
- Rename messageReceivedLast to channelReadComplete

We renamed messageReceivedLast to channelReadComplete because it
reflects what it really is for.  Also, we renamed messageReceived to
channelRead for consistency in method names.
2013-07-09 23:58:51 +09:00
Trustin Lee
79e236dfc2 Make EventExecutor.shutdownGracefully() return Future
- Also added EventExecutor.terminationFuture()
- Also fixed type signature problem with Future.add/removeListener()
- Related issue: #1389
2013-06-12 08:00:54 +09:00
Norman Maurer
699ef0784e [#1317] Allow to use VoidPromise for flush(...), write(...) and sendFile(...)
* This also move rename Channel.Unsafe.voidFuture() to ChannelPropertyAccess.voidPromise()
2013-05-17 15:50:14 +02:00
Norman Maurer
7b854072d4 [#1327] Fix javadoc diagram for new api 2013-05-02 13:22:31 +02: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
Norman Maurer
88cc8c1739 [#1065] Provide Future/Promise without channel reference 2013-03-07 07:21:37 +01:00
Trustin Lee
1011227b88 Remove apiviz tags - we are focusing on user guide instead and putting diagrams there 2013-02-14 12:09:16 -08:00
Norman Maurer
4e77bacdf7 [#873] [#868] Split ChannelFuture into ChannelFuture and ChannelPromise 2012-12-31 23:27:16 +09:00
Norman Maurer
a9fdb682be Add javadocs and some small cleanups 2012-12-23 20:58:49 +01:00
Trustin Lee
02a6e85feb Add methods that add/remove multiple ChannelFutureListeners to ChannelFuture
- Fixes #811
2012-12-14 12:45:43 +09:00
norman
df72356d7d Rename classes as result of descussion on #594 2012-09-12 14:04:41 +02:00
Trustin Lee
11c742f392 [#59] Make ChannelFuture implement Future<Void> 2012-08-18 22:53:58 +09:00
Trustin Lee
42380b54b3 Revert file mode 2012-07-07 14:39:35 +09:00
Norman Maurer
f8ef5d5d78 Next round for async channel api support a.k.a nio2. See See #396 2012-06-14 21:02:47 +02:00
Trustin Lee
1eced1e9e3 Update license headers 2012-06-04 13:31:44 -07:00
Trustin Lee
311f17f6ef Replace Bootstrap with ChannelBuilder and ServerChannelBuilder
- Added ChannelInitializer which is supposed to be used with the
  builders
- Echo examples use ChannelBuilder and ServerChannelBuilder now
- Replace ChannelFuture.rethrowIfFailed() with sync*()
- Bug fixes
2012-05-14 23:57:23 +09:00
Trustin Lee
175acb7899 Prevent unsafe ChannelFutures from being passed to a pipeline 2012-05-13 01:35:43 +09:00
Trustin Lee
08137e2c49 Implement flush-future properly / Make channel options type-safe
- AbstractChannel keeps the expected number of written bytes so that
  the ChannelFuture of a flush() operation is notified on right timing.
  - Added ChannelBufferHolder.size() to make this possible
- Added AbstractChannel.isCompatible() so that only compatible EventLoop
  is accepted by a channel on registration
- Added ChannelOption to make channel options type-safe
- Moved writeSpinCount property to ChannelConfig and removed Nio*Config
- Miscellaneous cleanup

introducing
ChannelOption
2012-05-13 00:40:28 +09:00
Trustin Lee
368156f5d0 Another round of the new API design
- Channel now creates a ChannelPipeline by itself

  I find no reason to allow a user to use one's own pipeline
  implementation since I saw nobody does except for the cases where a
  user wants to add a user attribute to a channel, which is now covered
  by AttributeMap.

- Removed ChannelEvent and its subtypes because they are replaced by
  direct method invocation.
- Replaced ChannelSink with Channel.unsafe()
- Various getter renaming (e.g. Channel.getId() -> Channel.id())
- Added ChannelHandlerInvoker interface
- Implemented AbstractChannel and AbstractServerChannel
- Some other changes I don't remember
2012-05-01 17:19:41 +09:00
Trustin Lee
40ef4d2ccf Fix #153: Add ChannelFuture.rethrowIfFailed() 2012-01-19 13:33:37 +09:00
Trustin Lee
8663716d38 Issue #60: Make the project multi-module
Split the project into the following modules:
* common
* buffer
* codec
* codec-http
* transport
* transport-*
* handler
* example
* testsuite (integration tests that involve 2+ modules)
* all (does nothing yet, but will make it generate netty.jar)

This commit also fixes the compilation errors with transport-sctp on
non-Linux systems.  It will at least compile without complaints.
2011-12-28 19:44:04 +09:00