Commit Graph

4187 Commits

Author SHA1 Message Date
Trustin Lee
2ec932798f Replace .readable() and .writable() to .isReadable() and .isWritable() 2013-01-31 18:24:33 +01:00
Trustin Lee
42c65cca3a Make MessageBuf bounded
- Move common methods from ByteBuf to Buf
- Rename ensureWritableBytes() to ensureWritable()
- Rename readable() to isReadable()
- Rename writable() to isWritable()
- Add isReadable(int) and isWritable(int)
- Add AbstractMessageBuf
- Rewrite DefaultMessageBuf and QueueBackedMessageBuf
  - based on Josh Bloch's public domain ArrayDeque impl
2013-01-31 18:11:06 +01:00
Norman Maurer
ec013bf2d3 [#983] Force the user to implement an actual ChannelInboundHandler or ChannelOutboundHandler
For this ChannelInboundHandler* and ChannelOutboundHandler* was made package private
2013-01-31 15:50:27 +01:00
Trustin Lee
1f2aca02da Add more compiler plugin options to make compilerArguments works 2013-01-31 21:02:56 +09:00
Trustin Lee
db37652f2a Add compiler options to find unchecked/deprecated code 2013-01-31 20:57:58 +09:00
Norman Maurer
2ad1451ce8 Fix semantic of DefaultAttribute impl on setIfAbsent 2013-01-31 11:52:36 +01:00
Courtney Robinson
2d9cc9f63b Allow to specify the mode the encoder uses for form params. This allows it to be used with OAUTH
The OAuth 1 spec has small deviations from UrlEncoder.encode's output.

+ Percent encodes the parameters
+ Added tests to verify
+ See relevant OAuth section
http://oauth.net/core/1.0/#encoding_parameters
+ Detailed explanation http://hueniverse.com/oauth/guide/authentication/
2013-01-31 07:49:34 +01:00
Trustin Lee
b46760f93f Upgrade to netty-build-15 to fix build issues 2013-01-31 14:11:54 +09:00
Trustin Lee
071b067b3f Add missing file
- Related issue: #1003
2013-01-31 12:28:27 +09:00
Trustin Lee
073517dc63 Rename localtime to worldtime so that a user thinks it's a local transport example
- Fixes #1003
2013-01-31 12:27:57 +09:00
Trustin Lee
39357f3835 Enable TCP_NODELAY and SCTP_NODELAY by default
- Fixes #939
- Add PlatformDependent.canEnableTcpNoDelayByDefault()
  - Currently returns false on Android. Will change if necessary later.
2013-01-31 12:17:09 +09:00
Trustin Lee
152c969eab Make Bootstrap and ServerBootstrap thread-safe
- Additional fix for: #970
- Use LinkedHashMap again to save memory consumption
- ServerBootstrap now makes a copy of child parameters so that modifying ServerBootstrap after bind() does not affect the already-bound servers. This also makes child channel initialization potentially faster due to reduced garbage iterator.
2013-01-31 11:34:28 +09:00
Trustin Lee
604b359d9e Use InetSocketAddress(0) if no localAddress is specified for connect() operation in UDT 2013-01-31 10:22:03 +09:00
Norman Maurer
eeab6767db Tighten up generics on ServerBootstrap again as it was fixed in UDT 2013-01-30 21:38:15 +01:00
Andrei Pozolotin
82f876f7db [#999] Refactor UDT transport to make use of the ServerChannel interface 2013-01-30 21:17:23 +01:00
Norman Maurer
97ea338bce [#971] Fix a bug where the HttpContentCompressor was try to start compressing on an empty response 2013-01-30 20:58:07 +01:00
Norman Maurer
641db5cdfe Only write the header as it should be 2013-01-30 20:40:06 +01:00
Norman Maurer
cff2edf75d Remove not used enum 2013-01-30 19:02:29 +01:00
Trustin Lee
33c9f3f1e5 Relax ServerBootstrap type constraint to support UDT properly 2013-01-30 22:04:20 +09:00
Trustin Lee
05d16cd361 Made Bootstrap and ServerBootstrap copy constructors private as suggested 2013-01-30 21:55:10 +09:00
Trustin Lee
b1b0319bbe Fix build errors and warnings 2013-01-30 21:47:34 +09:00
Norman Maurer
1bb003d9ae [#995] Replace AtomicReference usage with AtomicReferenceFieldUpdater
This will safe as an example 2gb mem when have 10 DefaultHandlerContext instances per connection and the connection count is 1000000.
Also kind of related to [#920]
2013-01-30 13:45:39 +01:00
Trustin Lee
03de5f479a Fix build errors 2013-01-30 21:43:37 +09:00
Trustin Lee
23438de66f Move AbstractBootstrap.ChannelFactory out of AbstractBootstrap and hide AbstractBootstrap from a user
- Fixes #998
- Also generified ChannelFactory
2013-01-30 21:40:49 +09:00
Trustin Lee
86135a4080 Make ServerBootstrap final
- Related: #997
2013-01-30 21:14:23 +09:00
Trustin Lee
7c50c1e2e6 Make Bootstrap and ServerBootstrap implement Cloneable and rename duplicate() to clone()
- Fixes #997
- Replace duplicate() with clone()
- Add copy constructor for simplicity
- Can now clone invalid/incomplete bootstrap
- Upgrade to netty-build-14 to disable SuperClone checkstyle module
- Finalize class hierarchy so no subclasses are introduced
2013-01-30 21:12:42 +09:00
Luke Wood
bd0339ce1a Fix buffer over-run in Snappy codec when emitting a copy that leaves < 4 bytes remaining 2013-01-30 12:15:57 +01:00
Trustin Lee
64e6c4021d Use the clearer parameter names that indicate the address is for Internet connections 2013-01-30 20:14:59 +09:00
Trustin Lee
788d7e9b8b Remove Bootstrap operations that require a promise and add various ad-hoc bind() and connect() operations
- Update examples to use the newly added bind() and connect()
  operations.
2013-01-30 20:11:00 +09:00
Norman Maurer
291293a6dc [#980] Automatically trigger a read operation if isAutoRead() == false but we only had a partial decode 2013-01-30 09:16:45 +01:00
Norman Maurer
3843cfd702 [SPDY] Factor out headers into extra class like we did in http and support method chaining where possible 2013-01-30 08:23:07 +01:00
Norman Maurer
238e03f75b Add setters and getters back to Http Objects
* This is done because we noticed that the previous change limit the usage more then it gave us any benefit. Now it is possible
  again to rewrite the url on the fly or reuse the objects when writing a proxy and so limit the GC pressure.
* Fixes also #979
2013-01-30 07:42:18 +01:00
Trustin Lee
c5ccaee506 Fix a bug in HttpPostRequestDecoder where character encoding is ignored when reading a line
- Fixed #992 (backported from 3)
  - 9650cda163
  - b38bde2d2b
2013-01-29 15:59:15 +09:00
Norman Maurer
a54217053f [#988] Fix typo 2013-01-28 11:26:53 +01:00
Norman Maurer
d7bfd44e10 [#982] [#977] [#858] Allow to transfer the content a ChannelHandlers inbound/outbound buffer on removal/replacement
This changes the behavior of the ChannelPipeline.remove(..) and ChannelPipeline.replace(..) methods in that way
that after invocation it is not possible anymore to access any data in the inbound or outbound buffer. This is
because it empty it now to prevent side-effects. If a user want to preserve the content and forward it to the
next handler in the pipeline it is adviced to use one of the new methods which where introduced.

 - ChannelPipeline.removeAndForward(..)
 - ChannelPipeline.replaceAndForward(..)
2013-01-28 10:25:38 +01:00
Norman Maurer
a27d1cc365 [#986] DefaultChannelHandlerContext.fireUserEventTriggered(...) uses correct ChannelHandlerContext now 2013-01-26 16:47:00 +01:00
Norman Maurer
cc278d45c2 Disable test as this let fail the build 80% times on osx and slow linux servers. Need to investigate 2013-01-26 16:17:12 +01:00
Norman Maurer
9da01417b2 [#973] Use static IdleStateEvents to reduce GC pressure 2013-01-23 17:34:27 +01:00
Norman Maurer
b9aaf9a167 [#977] Stop processing messages/bytes in a loop when the handler was removed from the ChannelPipeline 2013-01-23 07:35:44 +01:00
Norman Maurer
3f72add89a [#976] Fix exception which will be raised by ChannelInboundHandler.discardInboundReadBytes() and ChannelOutboundHandler.discardOutboundReadBytes() if the handler remove it self from the pipeline 2013-01-23 07:27:00 +01:00
Norman Maurer
a25f7fa2e5 Revert "[#972] Correctly mark the ChannelPipeline once a ChannelHandler was removed and because of this a buffer was freed"
This reverts commit 4ac3bace0f.
2013-01-23 06:45:44 +01:00
Norman Maurer
4ac3bace0f [#972] Correctly mark the ChannelPipeline once a ChannelHandler was removed and because of this a buffer was freed 2013-01-22 21:18:13 +01:00
Brian Roach
54af70f067 Bootstrap thread safety
Changed options and attrs from LinkedHashMap to ConcurrentHashMap to
avoid a possible ConcurrentModificationException if a thread was
adding/removing options/attrs while another was calling Bootstrap.init()
or Bootstrap.duplicate()
2013-01-22 07:06:02 +01:00
Norman Maurer
ee9f30a2b9 *ChannelBuffer* -> *ByteBuf* and ChannelBuffersTest -> UnpooledTest 2013-01-21 21:02:25 +01:00
Courtney Robinson
7b6cbdbb1e [#964] ByteBuf.readLine() must return null when no more data is available in ByteBuf 2013-01-21 20:56:00 +01:00
Andrei Pozolotin
a91887cda7 transport-udt tests should run only when provider class can be loaded and initialized 2013-01-21 17:06:44 +01:00
Luke Wood
318328bb06 [#957] Netty/Transport/RXTX: Add an optional wait time after opening the serial port but before configuration to allow the serial microcontroller to reset itself after opening. 2013-01-21 16:34:48 +01:00
Norman Maurer
4192222b38 Rname StreamOioByteChannel to OioByteStreamChannel 2013-01-21 12:10:07 +01:00
Norman Maurer
7316a3c65c [#965] Allow to adjust the SO_TIMEOUT on the fly 2013-01-21 11:48:05 +01:00
Norman Maurer
29bed32a89 [#963] Fix invalid free-up of messages if they are only passed-throught in HttpContentEncoder and HttpContentDecoder 2013-01-21 10:41:23 +01:00