Skip to content

Commit 703aa30

Browse files
committed
Deploy site '7e1d0853e' on 2019-03-22 13:35:30
1 parent 7e1d085 commit 703aa30

32 files changed

+36
-35
lines changed

images/concurrent.png

35.2 KB
Loading

images/handler.png

14.6 KB
Loading

images/state_3.png

33.4 KB
Loading

images/state_4.png

32.8 KB
Loading

images/state_small_4.png

15.1 KB
Loading

wiki/adopters.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ <h1>Adopters</h1>
838838

839839
</div>
840840
<div class="text-right clearfix">
841-
<small>Last retrieved on 08-Mar-2019</small>
841+
<small>Last retrieved on 22-Mar-2019</small>
842842
</div>
843843
</div>
844844
</div>

wiki/all-documents.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ <h1>All documentation pages</h1>
322322
</li>
323323
</ul>
324324
<div class="text-right">
325-
<small>Last retrived on 08-Mar-2019</small>
325+
<small>Last retrived on 22-Mar-2019</small>
326326
</div>
327327
</div>
328328
</div>

wiki/developer-guide.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ <h3 id="wiki-h3-2">
295295
<div class="row">
296296
<div class="col-md-9">
297297
<div class="text-right">
298-
<small>Last retrieved on 08-Mar-2019</small>
298+
<small>Last retrieved on 22-Mar-2019</small>
299299
</div>
300300
</div>
301301
</div>

wiki/forked-tomcat-native.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ <h2 id="wiki-h2-16">
591591
<div class="row">
592592
<div class="col-md-9">
593593
<div class="text-right">
594-
<small>Last retrieved on 08-Mar-2019</small>
594+
<small>Last retrieved on 22-Mar-2019</small>
595595
</div>
596596
</div>
597597
</div>

wiki/gsoc-19-netty.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ <h2 id="wiki-h2-11">
354354
<div class="row">
355355
<div class="col-md-9">
356356
<div class="text-right">
357-
<small>Last retrieved on 08-Mar-2019</small>
357+
<small>Last retrieved on 22-Mar-2019</small>
358358
</div>
359359
</div>
360360
</div>

wiki/microbenchmarks.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ <h2 id="wiki-h2-2">
299299
<div class="row">
300300
<div class="col-md-9">
301301
<div class="text-right">
302-
<small>Last retrieved on 08-Mar-2019</small>
302+
<small>Last retrieved on 22-Mar-2019</small>
303303
</div>
304304
</div>
305305
</div>

wiki/native-transports.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ <h3 id="wiki-h3-5">
334334
<div class="row">
335335
<div class="col-md-9">
336336
<div class="text-right">
337-
<small>Last retrieved on 08-Mar-2019</small>
337+
<small>Last retrieved on 22-Mar-2019</small>
338338
</div>
339339
</div>
340340
</div>

wiki/new-and-noteworthy-in-4.0.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ <h2 id="wiki-h2-12">
427427
<code>EventExecutor</code> and <code>EventExecutorGroup</code> - generic event loop API</li>
428428
</ul>
429429
<p>They are used as the base of the channel API which will be explained later in this document. For example, <code>ChannelFuture</code> extends <code>io.netty.util.concurrent.Future</code> and <code>EventLoopGroup</code> extends <code>EventExecutorGroup</code>.</p>
430-
<p><img src="https://camo.githubusercontent.com/0f8cc784d7f625a929786653e31587d3935b571c/687474703a2f2f756d6c2e6d766e7365617263682e6f72672f676973742f6434616439316631376162643131376533306631" alt="Event loop type hierarchy diagram" data-canonical-src="http://uml.mvnsearch.org/gist/d4ad91f17abd117e30f1"></p>
430+
<p><img src="https://camo.githubusercontent.com/b0e9af4442495cf432701731adf901886a75d81c/68747470733a2f2f6e657474792e696f2f696d616765732f636f6e63757272656e742e706e67" alt="Event loop type hierarchy diagram" data-canonical-src="https://netty.io/images/concurrent.png"></p>
431431
<h2 id="wiki-h2-13">
432432
<a id="user-content-channel-api-changes" class="anchor" href="#channel-api-changes" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Channel API changes</h2>
433433
<p>In 4.0, many classes under the <code>io.netty.channel</code> package have gone through a major overhaul, and thus simple text search-and-replace will not make your 3.x application work with 4.0. This section will try to show the thought process behind such a big change, rather than being an exhaustive resource for all the changes.</p>
@@ -441,7 +441,7 @@ <h4 id="wiki-h4-16">
441441
<p>In 3.x, <code>ChannelHandler</code> was just a tag interface, and <code>ChannelUpstreamHandler</code>, <code>ChannelDownstreamHandler</code>, and <code>LifeCycleAwareChannelHandler</code> defined the actual handler methods. In Netty 4, <code>ChannelHandler</code> merges <code>LifeCycleAwareChannelHandler</code> along with a couple more methods which are useful to both an inbound and an outbound handler:</p>
442442
<div class="highlight highlight-source-java"><pre><span class="pl-k">public</span> <span class="pl-k">interface</span> <span class="pl-en">ChannelHandler</span> {&#x000A; <span class="pl-k">void</span> <span class="pl-en">handlerAdded</span>(<span class="pl-smi">ChannelHandlerContext</span> <span class="pl-v">ctx</span>) <span class="pl-k">throws</span> <span class="pl-smi">Exception</span>;&#x000A; <span class="pl-k">void</span> <span class="pl-en">handlerRemoved</span>(<span class="pl-smi">ChannelHandlerContext</span> <span class="pl-v">ctx</span>) <span class="pl-k">throws</span> <span class="pl-smi">Exception</span>;&#x000A; <span class="pl-k">void</span> <span class="pl-en">exceptionCaught</span>(<span class="pl-smi">ChannelHandlerContext</span> <span class="pl-v">ctx</span>, <span class="pl-smi">Throwable</span> <span class="pl-v">cause</span>) <span class="pl-k">throws</span> <span class="pl-smi">Exception</span>;&#x000A;}</pre></div>
443443
<p>The following diagram depicts the new type hierarchy:</p>
444-
<p><img src="https://camo.githubusercontent.com/198bb38a5d0bb5bae43afccbabaf4fe57e7ddf95/687474703a2f2f756d6c2e6d766e7365617263682e6f72672f676973742f3138383234346334623364366230316330313536" alt="ChannelHandler type hierarchy diagram" data-canonical-src="http://uml.mvnsearch.org/gist/188244c4b3d6b01c0156"></p>
444+
<p><img src="https://camo.githubusercontent.com/4ea8c586c7b76d80ccd001dd11081bc1d86dc9f5/68747470733a2f2f6e657474792e696f2f696d616765732f68616e646c65722e706e67" alt="ChannelHandler type hierarchy diagram" data-canonical-src="https://netty.io/images/handler.png"></p>
445445
<h4 id="wiki-h4-17">
446446
<a id="user-content-channelhandler-with-no-event-object" class="anchor" href="#channelhandler-with-no-event-object" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>ChannelHandler</code> with no event object</h4>
447447
<p>In 3.x, every I/O operation created a <code>ChannelEvent</code> object. For each read / write, it additionally created a new <code>ChannelBuffer</code>. It simplified the internals of Netty quite a lot because it delegates resource management and buffer pooling to the JVM. However, it often was the root cause of GC pressure and uncertainty which are sometimes observed in a Netty-based application under high load.</p>
@@ -453,12 +453,12 @@ <h4 id="wiki-h4-17">
453453
<h4 id="wiki-h4-18">
454454
<a id="user-content-simplified-channel-state-model" class="anchor" href="#simplified-channel-state-model" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Simplified channel state model</h4>
455455
<p>When a new connected <code>Channel</code> is created in 3.x, at least three <code>ChannelStateEvent</code>s are triggered: <code>channelOpen</code>, <code>channelBound</code>, and <code>channelConnected</code>. When a <code>Channel</code> is closed, at least 3 more: <code>channelDisconnected</code>, <code>channelUnbound</code>, and <code>channelClosed</code>.</p>
456-
<p><img src="https://camo.githubusercontent.com/bc51b738136f98753ad73372aeedc6e8376c376e/687474703a2f2f756d6c2e6d766e7365617263682e6f72672f676973742f3433333564363363353330623665316335653265" alt="Netty 3 Channel state diagram" data-canonical-src="http://uml.mvnsearch.org/gist/4335d63c530b6e1c5e2e"></p>
456+
<p><img src="https://camo.githubusercontent.com/f6e3580ea502a4f318ba9a20ac69342ff47ff4f2/68747470733a2f2f6e657474792e696f2f696d616765732f73746174655f332e706e67" alt="Netty 3 Channel state diagram" data-canonical-src="https://netty.io/images/state_3.png"></p>
457457
<p>However, it's of dubious value to trigger that many events. It is more useful for a user to get notified when a <code>Channel</code> enters the state where it can perform reads and writes.</p>
458-
<p><img src="https://camo.githubusercontent.com/f89f38aa4d99131fa547033192d2d5361cca297f/687474703a2f2f756d6c2e6d766e7365617263682e6f72672f676973742f3665666662363861643235313563613064363138" alt="Netty 4 Channel state diagram" data-canonical-src="http://uml.mvnsearch.org/gist/6effb68ad2515ca0d618"></p>
458+
<p><img src="https://camo.githubusercontent.com/aafdea3bd1be0ab082a9a1250952accfb8c41a47/68747470733a2f2f6e657474792e696f2f696d616765732f73746174655f736d616c6c5f342e706e67" alt="Netty 4 Channel state diagram" data-canonical-src="https://netty.io/images/state_small_4.png"></p>
459459
<p><code>channelOpen</code>, <code>channelBound</code>, and <code>channelConnected</code> have been merged to <code>channelActive</code>. <code>channelDisconnected</code>, <code>channelUnbound</code>, and <code>channelClosed</code> have been merged to <code>channelInactive</code>. Likewise, <code>Channel.isBound()</code> and <code>isConnected()</code> have been merged to <code>isActive()</code>.</p>
460460
<p>Note that <code>channelRegistered</code> and <code>channelUnregistered</code> are not equivalent to <code>channelOpen</code> and <code>channelClosed</code>. They are new states introduced to support dynamic registration, deregistration, and re-registration of a <code>Channel</code>, as illustrated below:</p>
461-
<p><img src="https://camo.githubusercontent.com/af66a515de1ad848367c7ceffe1f8567dcac43c9/687474703a2f2f756d6c2e6d766e7365617263682e6f72672f676973742f3633383235333066373839306239663136343732" alt="Netty 4 Channel state diagram for re-registration" data-canonical-src="http://uml.mvnsearch.org/gist/6382530f7890b9f16472"></p>
461+
<p><img src="https://camo.githubusercontent.com/856a90ef3d3da9e0f9c2ea0b2ce07cd0adf91713/68747470733a2f2f6e657474792e696f2f696d616765732f73746174655f342e706e67" alt="Netty 4 Channel state diagram for re-registration" data-canonical-src="https://netty.io/images/state_4.png"></p>
462462
<h4 id="wiki-h4-19">
463463
<a id="user-content-write-does-not-flush-automatically" class="anchor" href="#write-does-not-flush-automatically" aria-hidden="true"><svg class="octicon octicon-link" viewbox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a><code>write()</code> does not flush automatically</h4>
464464
<p>4.0 introduced a new operation called <code>flush()</code> which explicitly flushes the outbound buffer of a <code>Channel</code>, and <code>write()</code> operation does not flush automatically. You can think of this as a <code>java.io.BufferedOutputStream</code>, except that it works at message level.</p>
@@ -674,7 +674,7 @@ <h3 id="wiki-h3-41">
674674
<div class="row">
675675
<div class="col-md-9">
676676
<div class="text-right">
677-
<small>Last retrieved on 08-Mar-2019</small>
677+
<small>Last retrieved on 22-Mar-2019</small>
678678
</div>
679679
</div>
680680
</div>

wiki/new-and-noteworthy-in-4.1.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ <h3 id="wiki-h3-19">
399399
<div class="row">
400400
<div class="col-md-9">
401401
<div class="text-right">
402-
<small>Last retrieved on 08-Mar-2019</small>
402+
<small>Last retrieved on 22-Mar-2019</small>
403403
</div>
404404
</div>
405405
</div>

wiki/new-and-noteworthy-in-5.0.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ <h3 id="wiki-h3-4">
311311
<div class="row">
312312
<div class="col-md-9">
313313
<div class="text-right">
314-
<small>Last retrieved on 08-Mar-2019</small>
314+
<small>Last retrieved on 22-Mar-2019</small>
315315
</div>
316316
</div>
317317
</div>

wiki/new-and-noteworthy.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ <h1>New and noteworthy</h1>
256256

257257
</div>
258258
<div class="text-right clearfix">
259-
<small>Last retrieved on 08-Mar-2019</small>
259+
<small>Last retrieved on 22-Mar-2019</small>
260260
</div>
261261
</div>
262262
</div>

wiki/reference-counted-objects.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ <h3 id="wiki-h3-12">
446446
<div class="row">
447447
<div class="col-md-9">
448448
<div class="text-right">
449-
<small>Last retrieved on 08-Mar-2019</small>
449+
<small>Last retrieved on 22-Mar-2019</small>
450450
</div>
451451
</div>
452452
</div>

wiki/related-articles.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ <h2 id="wiki-h2-9">
514514
<div class="row">
515515
<div class="col-md-9">
516516
<div class="text-right">
517-
<small>Last retrieved on 08-Mar-2019</small>
517+
<small>Last retrieved on 22-Mar-2019</small>
518518
</div>
519519
</div>
520520
</div>

wiki/related-projects.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ <h1>Related projects</h1>
416416

417417
</div>
418418
<div class="text-right clearfix">
419-
<small>Last retrieved on 08-Mar-2019</small>
419+
<small>Last retrieved on 22-Mar-2019</small>
420420
</div>
421421
</div>
422422
</div>

wiki/releasing-new-version.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ <h2 id="wiki-h2-9">
397397
<div class="row">
398398
<div class="col-md-9">
399399
<div class="text-right">
400-
<small>Last retrieved on 08-Mar-2019</small>
400+
<small>Last retrieved on 22-Mar-2019</small>
401401
</div>
402402
</div>
403403
</div>

wiki/requirements-for-4.x.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ <h3 id="wiki-h3-7">
327327
<div class="row">
328328
<div class="col-md-9">
329329
<div class="text-right">
330-
<small>Last retrieved on 08-Mar-2019</small>
330+
<small>Last retrieved on 22-Mar-2019</small>
331331
</div>
332332
</div>
333333
</div>

wiki/requirements.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ <h1>Requirements</h1>
255255

256256
</div>
257257
<div class="text-right clearfix">
258-
<small>Last retrieved on 08-Mar-2019</small>
258+
<small>Last retrieved on 22-Mar-2019</small>
259259
</div>
260260
</div>
261261
</div>

0 commit comments

Comments
 (0)