Commit Graph

41 Commits

Author SHA1 Message Date
JongYoonLim
8cbc46a301 Returns after encoding each message not do check following instance types
Motivation:
Current AbstractMemcacheObjectEncoder does unnecessary message type checking if the message is MemcacheMessage type.

Modifications:
Returns after encoding MemcacheMessage message.

Result:
Small performance improvement for this encoder.
2015-03-19 20:43:10 +01:00
JongYoonLim
5dd3e883b1 fix typo 2015-03-19 20:40:13 +01:00
Norman Maurer
a0ca605425 [maven-release-plugin] prepare for next development iteration 2015-03-03 08:30:59 -05:00
Norman Maurer
51a90ee2f5 [maven-release-plugin] prepare release netty-5.0.0.Alpha2 2015-03-03 08:27:16 -05:00
Trustin Lee
de9c81bf6e Add proxy support for client socket connections
Related issue: #1133

Motivation:

There is no support for client socket connections via a proxy server in
Netty.

Modifications:

- Add a new module 'handler-proxy'
- Add ProxyHandler and its subclasses to support SOCKS 4a/5 and HTTP(S)
  proxy connections
- Add a full parameterized test for most scenarios
- Clean up pom.xml

Result:

A user can make an outgoing connection via proxy servers with only
trivial effort.
2014-10-14 12:40:33 +09:00
Trustin Lee
330404da07 Fix most inspector warnings
Motivation:

It's good to minimize potentially broken windows.

Modifications:

Fix most inspector warnings from our profile

Result:

Cleaner code
2014-07-02 19:04:11 +09:00
Trustin Lee
0ef87697d5 Fix potential buffer leak in AbstractBinaryMemcacheDecoder
If a connection is closed unexpectedly while
AbstractBinaryMemcacheDecoder decodes a message, the half-constructed
message's content might not be released.
2014-06-24 16:24:48 +09:00
Trustin Lee
ca212c2162 Adhere to our getter/setter naming rules
Motivation:

Persuit for consistent method naming across all classes

Modifications:

Remove 'get' prefix for the getter methods in codec-memcache

Result:

More consistent method naming
2014-06-24 16:08:46 +09:00
Trustin Lee
2f650fdab7 Fix buffer leak in DefaultFullBinaryMemcacheRequest/Response
Motivation:

DefaultFullBinaryMemcacheRequest/Response overrides release(), retain(),
and touch() methods without calling its super, resulting in a leak of
the extras.

Modifications:

When overriding release(), retain(), and touch(), ensure to call super.

Result:

Fixes #2533 by fixing the buffer leak
2014-06-24 15:04:50 +09:00
Trustin Lee
2e98566916 Introduce MessageAggregator and DecoderResultProvider
Motivation:

We have different message aggregator implementations for different
protocols, but they are very similar with each other.  They all stems
from HttpObjectAggregator.  If we provide an abstract class that provide
generic message aggregation functionality, we will remove their code
duplication.

Modifications:

- Add MessageAggregator which provides generic message aggregation
- Reimplement all existing aggregators using MessageAggregator
- Add DecoderResultProvider interface and extend it wherever possible so
  that MessageAggregator respects the state of the decoded message

Result:

Less code duplication
2014-06-05 16:39:59 +09:00
Trustin Lee
d2614cfc01 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:36:01 +09:00
Michael Nitschinger
797d6d94a4 [codec-memcache] Avoid NPE on channelInactive.
Motivation:
When no currentMessage has been set and the channel is inactive, a NPE is raised.

Modification:
Make sure that a currentMessage is available before checking the extras.

Result:
No more NPE raised potentially.
2014-04-23 11:41:07 +02:00
Michael Nitschinger
1fe0b53e29 [codec-memcache] Simplify object hierachy and remove Headers.
This changeset removes the separate message headers and merges the
field directly into the messages. This greatly simplifies the
object hierachy and also saves header allocations in the pipeline.
2014-03-04 13:04:44 +01:00
Michael Nitschinger
3f53ba2e36 Always upstream full memcache messages.
This changeset is related to #2182, which exposes the failure in
the http codec, but the memcache codec works very similar. In addition,
better failure handling in the decoder has been added.
2014-02-23 16:44:06 +01:00
Trustin Lee
0f1b1be0aa Enable a user specify an arbitrary information with ReferenceCounted.touch()
- Related: #2163
- Add ResourceLeakHint to allow a user to provide a meaningful information about the leak when touching it
- DefaultChannelHandlerContext now implements ResourceLeakHint to tell where the message is going.
- Cleaner resource leak report by excluding noisy stack trace elements
2014-01-29 11:44:59 +09:00
Trustin Lee
b887e35ac2 Add ReferenceCounted.touch() / Add missing retain() overrides
- Fixes #2163
- Inspector warnings
2014-01-28 20:06:55 +09:00
Trustin Lee
f3a842ecca [maven-release-plugin] prepare for next development iteration 2013-12-22 22:06:15 +09:00
Trustin Lee
888dfba76f [maven-release-plugin] prepare release netty-5.0.0.Alpha1 2013-12-22 22:06:06 +09:00
Trustin Lee
94d6e44bba Change the return type of EmbeddedChannel.read*() from Object to an ad-hoc type parameter
.. so that there's no need to explicitly down-cast.

Fixes #2067
2013-12-16 22:22:47 +09:00
Michael Nitschinger
31b977bcad codec-memcache: prefix abstract classes with Abstract. 2013-12-09 11:28:59 +01:00
Michael Nitschinger
a06810609b codec-memcache: No need to allocate a buffer if no extra is used. 2013-12-09 08:07:05 +01:00
Trustin Lee
4903b7fd17 Fix another buffer leak in BinaryMemcacheDecoderTest 2013-12-07 21:50:49 +09:00
Trustin Lee
5e86ccace9 Fix buffer leaks in BinaryMemcacheDecoderTest 2013-12-07 15:06:30 +09:00
Trustin Lee
f03f1eaaba Fix a buffer leak in BinaryMemcacheDecoder 2013-12-07 15:00:32 +09:00
Trustin Lee
2e53322be0 Fix buffer leaks in BinaryMemcacheEncoderTest 2013-12-07 12:15:44 +09:00
Trustin Lee
f8138619f0 Fix a buffer leak in BinaryMemcacheObjectAggregatorTest 2013-12-07 11:22:59 +09:00
Trustin Lee
73379195eb Fix a buffer leak in BinaryMemcacheObjectAggregatorTest 2013-12-07 11:19:26 +09:00
Trustin Lee
6554b8c395 readableBytes() ==0 -> !isReadable() 2013-12-06 13:29:46 +09:00
Trustin Lee
27d020fc35 Hide protocol detail from users 2013-12-06 13:27:51 +09:00
Michael Nitschinger
920e7a5539 codec-memcache: increase default buffer size and only encode extras if set. 2013-12-05 13:37:16 +01:00
Michael Nitschinger
addae7b8ad [codec-memcache] encode key directly, no need to use unpooled. 2013-12-02 13:01:51 +01:00
Michael Nitschinger
624b92b4b1 codec-memcache: removed println in test case. 2013-12-02 11:58:44 +01:00
Michael Nitschinger
5fb7dcc4c6 codec-memcache: fix decoding issue for value parts.
This changeset fixes an issue when decoding would stop if the value
comes separated in two or more packets, leading to invalid bytes read.
2013-12-02 11:54:38 +01:00
Trustin Lee
110745b0eb Remove the distinction of inbound handlers and outbound handlers
- Fixes #1808
- Move all methods in ChannelInboundHandler and ChannelOutboundHandler up to ChannelHandler
- Remove ChannelInboundHandler and ChannelOutboundHandler
- Deprecate ChannelInboundHandlerAdapter, ChannelOutboundHandlerAdapter, and ChannelDuplexHandler
- Replace CombinedChannelDuplexHandler with ChannelHandlerAppender
  because it's not possible to combine two handlers into one easily now
- Introduce 'Skip' annotation to pass events through efficiently
- Remove all references to the deprecated types and update Javadoc
2013-11-27 17:31:28 +09:00
Trustin Lee
807d96ed6c Simplify bundle generation / Add io.netty.versions.properties to all JARs
- Fixes #2003 properly
- Instead of using 'bundle' packaging, use 'jar' packaging.  This is
  more robust because some strict build tools fail to retrieve the
  artifacts from a Maven repository unless their packaging is not 'jar'.
- All artifacts now contain META-INF/io.netty.version.properties, which
  provides the detailed information about the build and repository.
- Removed OSGi testsuite temporarily because it gives false errors
  during split package test and examination.
- Add io.netty.util.Version for easy retrieval of version information
2013-11-26 22:00:14 +09:00
Michael Nitschinger
8b5f8de2ef Avoid memory leak when encoding the key 2013-11-22 19:22:45 +01:00
Trustin Lee
a9893f3bd2 Abstract classes' names should start with 'Abstract' 2013-11-04 20:21:55 +09:00
Trustin Lee
f7c70366ea Fixed various inspector warnings 2013-11-04 20:19:33 +09:00
Trustin Lee
ff34bb08a6 Moved constant classes out of util 2013-11-04 20:10:52 +09:00
Trustin Lee
26415b8f4c Use StringUtil.simpleClassName(..) instead of Class.getSimpleName() where necessary
- Class.getSimpleName() doesn't render anonymous classes very well
- + some minor cleanup
2013-11-04 19:42:33 +09:00
Michael Nitschinger
5169376309 Implementing the Binary Memcache protocol
This changeset implements the full memcache binary protocol spec, including
a first batch of tests. Ascii protocol and more coverage and helper classes
will follow.
2013-11-04 19:24:14 +09:00