run-example.sh

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Drop SPDY support (#8845)

Motivation:

SPDY has been superseded by HTTP/2. Chrome has dropped support in 2016 and GFE no longer negociate it.

Modifications:

* drop codec

* drop examples

* drop constants from `ApplicationProtocolNames`

Result:

SPDY support dropped from Netty 5

  1. … 65 more files in changeset.
Drop SPDY support

Motivation:

SPDY has been superseded by HTTP/2. Chrome has dropped support in 2016 and GFE no longer negociate it.

Modifications:

* drop codec

* drop examples

* drop constants from `ApplicationProtocolNames`

Result:

SPDY support dropped from Netty 5

  1. … 65 more files in changeset.
Skip forbidden API check when running examples

Motivation:

We should skip the forbidden API check when run the examples as otherwise it may fail.

Modifications:

Skip the API check in run-example.sh

Result:

Be able to run the examples in all cases.

Skip forbidden API check when running examples

Motivation:

We should skip the forbidden API check when run the examples as otherwise it may fail.

Modifications:

Skip the API check in run-example.sh

Result:

Be able to run the examples in all cases.

Add UptimeServer and adjust UptimeClient's code style.

Motivation:

Uptime example is lack of server.

UptimeClient's code style is a little bit different from others, which make reader feel confused.

We don't need to create a new Bootstrap instance each time client reconnect to server.

Modification:

Add UptimeServer and UptimeServerHandler which simply accept all connection and discard all message.

Change UptimeClient's code style.

Share a single Bootstrap instance.

Result:

Uptime server support.

Consistent code style.

Single Bootstrap for all reconnection.

  1. … 4 more files in changeset.
Add UptimeServer and adjust UptimeClient's code style.

Motivation:

Uptime example is lack of server.

UptimeClient's code style is a little bit different from others, which make reader feel confused.

We don't need to create a new Bootstrap instance each time client reconnect to server.

Modification:

Add UptimeServer and UptimeServerHandler which simply accept all connection and discard all message.

Change UptimeClient's code style.

Share a single Bootstrap instance.

Result:

Uptime server support.

Consistent code style.

Single Bootstrap for all reconnection.

  1. … 4 more files in changeset.
Add an example client for codec-redis

Motivation:

- Add an example Redis client using codec-redis.

Modifications:

- Add an example Redis client that reads input from STDIN and writes output to STDOUT.

Result:

- Added an example Redis client using codec-redis.

  1. … 3 more files in changeset.
Map HTTP/2 Streams to Channels

Motivation:

This allows using handlers for Streams in normal Netty-style. Frames are

read/written to the channel as messages, not directly as a

callback/method call. Handlers allow mixing and can ease HTTP/1 and

HTTP/2 interoperability by eventually supporting HTTP/1 handlers in

HTTP/2 and vise versa.

Modifications:

New handler Http2MultiplexCodec that converts from the current HTTP/2

API to a message-based API and child channels for streams.

Result:

The basics are done for server-side: new streams trigger creation of new

channels in much the same appearance to how new connections trigger new

channel creation. The basic frames HEADERS and DATA are handled, but

also GOAWAY and RST_STREAM.

Inbound flow control is implemented, but outbound is not. That will be

done later, along with not completing write promises on the child

channel until the write actually completes on the parent.

There is not yet support for outbound priority/weight, push promises,

and many other features.

There is a generic Object that may be set on stream frames. This also

paves the way for client-side support which needs a way to refer to

yet-to-be-created streams (due to how HEADERS allocates a stream id, and

the allocation order must be the same as transmission order).

  1. … 21 more files in changeset.
Add HTTP/2 Netty tiles example

Motivation:

Adding an example that showcases Netty’s HTTP/2 codec and that is

slightly more complex than the existing hello-world example. It is

based on the Gopher tiles example available here:

https://http2.golang.org/gophertiles?latency=0

Modifications:

Moved current http2 example to http2/helloworld.

Added http2 tiles example under http2/tiles.

Result:

A Netty tiles example is available.

  1. … 227 more files in changeset.
Add HTTP/2 Netty tiles example

Motivation:

Adding an example that showcases Netty’s HTTP/2 codec and that is

slightly more complex than the existing hello-world example. It is

based on the Gopher tiles example available here:

https://http2.golang.org/gophertiles?latency=0

Modifications:

Moved current http2 example to http2/helloworld.

Added http2 tiles example under http2/tiles.

Result:

A Netty tiles example is available.

  1. … 227 more files in changeset.
HTTP/2 examples run script support

Motivation:

The example script has some changes that have not yet been backported. These changes should be backported.

Modifications:

run-example.sh changes related to http/2 are backported

Result:

HTTP/2 examples can be run on the 4.1 branch.

Add logLevel property to enable different log levels for the examples.

Motivation:

When running the examples using the provided run-examples.sh script the

log level is 'info' level. It can be handy to be able to configure a

different level, for example 'debug', while learning and trying out the

the examples.

Modifications:

Added a dependency to logback-classic to the examples pom.xml, and also

added a logback configuration file. The log level can be configured by

setting the 'logLevel' system property, and if that property is not set

the default will be 'info' level.

The run-examples.sh was updated to show an example of using the system

property to set the log level to 'debug'

Result:

It is now possible to turn on debug logging by settnig a system property

on the command line.

  1. … 2 more files in changeset.
Add logLevel property to enable different log levels for the examples.

Motivation:

When running the examples using the provided run-examples.sh script the

log level is 'info' level. It can be handy to be able to configure a

different level, for example 'debug', while learning and trying out the

the examples.

Modifications:

Added a dependency to logback-classic to the examples pom.xml, and also

added a logback configuration file. The log level can be configured by

setting the 'logLevel' system property, and if that property is not set

the default will be 'info' level.

The run-examples.sh was updated to show an example of using the system

property to set the log level to 'debug'

Result:

It is now possible to turn on debug logging by settnig a system property

on the command line.

  1. … 2 more files in changeset.
Add logLevel property to enable different log levels for the examples.

Motivation:

When running the examples using the provided run-examples.sh script the

log level is 'info' level. It can be handy to be able to configure a

different level, for example 'debug', while learning and trying out the

the examples.

Modifications:

Added a dependency to logback-classic to the examples pom.xml, and also

added a logback configuration file. The log level can be configured by

setting the 'logLevel' system property, and if that property is not set

the default will be 'info' level.

The run-examples.sh was updated to show an example of using the system

property to set the log level to 'debug'

Result:

It is now possible to turn on debug logging by settnig a system property

on the command line.

  1. … 2 more files in changeset.
ALPN java implementation Motivation:

Netty only supports a java NPN implementation provided by npn-api and npn-boot.

There is no java implementation for ALPN.

ALPN is needed to be compliant with the HTTP/2 spec.

Modifications:

-SslContext and JdkSslContext to support ALPN

-JettyNpn* class restructure for NPN and ALPN common aspects

-Pull in alpn-api and alpn-boot optional dependencies for ALPN java implementation

Result:

-Netty provides access to a java implementation of APLN

  1. … 25 more files in changeset.
Overall refactoring of the STOMP codec

- StompObject -> StompSubframe

- StompFrame -> StompHeadersSubframe

- StompContent -> StompContntSubframe

- FullStompFrame -> StompFrame

- StompEncoder/Decoder -> StompSubframeEncoder/Decoder

- StompAggregator -> StompSubframeAggregator

- Simplify the example

- Update Javadoc

- Miscellaneous cleanup

  1. … 31 more files in changeset.
Overall refactoring of the STOMP codec

- StompObject -> StompSubframe

- StompFrame -> StompHeadersSubframe

- StompContent -> StompContntSubframe

- FullStompFrame -> StompFrame

- StompEncoder/Decoder -> StompSubframeEncoder/Decoder

- StompAggregator -> StompSubframeAggregator

- Simplify the example

- Update Javadoc

- Miscellaneous cleanup

  1. … 31 more files in changeset.
Use a forked exec-maven-plugin instead of maven-antrun-plugin

Motivation:

maven-antrun-plugin does not redirect stdin, and thus it's impossible to

run interactive examples such as securechat-client and telnet-client.

org.codehaus.mojo:exec-maven-plugin redirects stdin, but it buffers

stdout and stderr, and thus an application output is not flushed timely.

Modifications:

Deploy a forked version of exec-maven-plugin which flushes output

buffers in a timely manner.

Result:

Interactive examples work. Launches faster than maven-antrun-plugin.

  1. … 2 more files in changeset.
Use a forked exec-maven-plugin instead of maven-antrun-plugin

Motivation:

maven-antrun-plugin does not redirect stdin, and thus it's impossible to

run interactive examples such as securechat-client and telnet-client.

org.codehaus.mojo:exec-maven-plugin redirects stdin, but it buffers

stdout and stderr, and thus an application output is not flushed timely.

Modifications:

Deploy a forked version of exec-maven-plugin which flushes output

buffers in a timely manner.

Result:

Interactive examples work. Launches faster than maven-antrun-plugin.

  1. … 3 more files in changeset.
Use a forked exec-maven-plugin instead of maven-antrun-plugin

Motivation:

maven-antrun-plugin does not redirect stdin, and thus it's impossible to

run interactive examples such as securechat-client and telnet-client.

org.codehaus.mojo:exec-maven-plugin redirects stdin, but it buffers

stdout and stderr, and thus an application output is not flushed timely.

Modifications:

Deploy a forked version of exec-maven-plugin which flushes output

buffers in a timely manner.

Result:

Interactive examples work. Launches faster than maven-antrun-plugin.

  1. … 3 more files in changeset.
Use a forked exec-maven-plugin instead of maven-antrun-plugin

Motivation:

maven-antrun-plugin does not redirect stdin, and thus it's impossible to

run interactive examples such as securechat-client and telnet-client.

org.codehaus.mojo:exec-maven-plugin redirects stdin, but it buffers

stdout and stderr, and thus an application output is not flushed timely.

Modifications:

Deploy a forked version of exec-maven-plugin which flushes output

buffers in a timely manner.

Result:

Interactive examples work. Launches faster than maven-antrun-plugin.

  1. … 3 more files in changeset.
Clean up the examples

Motivation:

The examples have not been updated since long time ago, showing various

issues fixed in this commit.

Modifications:

- Overall simplification to reduce LoC

- Use system properties to get options instead of parsing args.

- Minimize option validation

- Just use System.out/err instead of Logger

- Do not pass config as parameters - just access it directly

- Move the main logic to main(String[]) instead of creating a new

instance meaninglessly

- Update netty-build-21 to make checkstyle not complain

- Remove 'throws Exception' clause if possible

- Line wrap at 120 (previously at 80)

- Add an option to enable SSL for most examples

- Use ChannelFuture.sync() instead of await()

- Use System.out for the actual result. Use System.err otherwise.

- Delete examples that are not very useful:

- applet

- websocket/html5

- websocketx/sslserver

- localecho/multithreaded

- Add run-example.sh which simplifies launching an example from command

line

- Rewrite FileServer example

Result:

Shorter and simpler examples. A user can focus more on what it actually

does than miscellaneous stuff. A user can launch an example very

easily.

  1. … 147 more files in changeset.
Clean up the examples

Motivation:

The examples have not been updated since long time ago, showing various

issues fixed in this commit.

Modifications:

- Overall simplification to reduce LoC

- Use system properties to get options instead of parsing args.

- Minimize option validation

- Just use System.out/err instead of Logger

- Do not pass config as parameters - just access it directly

- Move the main logic to main(String[]) instead of creating a new

instance meaninglessly

- Update netty-build-21 to make checkstyle not complain

- Remove 'throws Exception' clause if possible

- Line wrap at 120 (previously at 80)

- Add an option to enable SSL for most examples

- Use ChannelFuture.sync() instead of await()

- Use System.out for the actual result. Use System.err otherwise.

- Delete examples that are not very useful:

- applet

- websocket/html5

- websocketx/sslserver

- localecho/multithreaded

- Add run-example.sh which simplifies launching an example from command

line

- Rewrite FileServer example

Result:

Shorter and simpler examples. A user can focus more on what it actually

does than miscellaneous stuff. A user can launch an example very

easily.

  1. … 160 more files in changeset.
Clean up the examples

Motivation:

The examples have not been updated since long time ago, showing various

issues fixed in this commit.

Modifications:

- Overall simplification to reduce LoC

- Use system properties to get options instead of parsing args.

- Minimize option validation

- Just use System.out/err instead of Logger

- Do not pass config as parameters - just access it directly

- Move the main logic to main(String[]) instead of creating a new

instance meaninglessly

- Update netty-build-21 to make checkstyle not complain

- Remove 'throws Exception' clause if possible

- Line wrap at 120 (previously at 80)

- Add an option to enable SSL for most examples

- Use ChannelFuture.sync() instead of await()

- Use System.out for the actual result. Use System.err otherwise.

- Delete examples that are not very useful:

- applet

- websocket/html5

- websocketx/sslserver

- localecho/multithreaded

- Add run-example.sh which simplifies launching an example from command

line

- Rewrite FileServer example

Result:

Shorter and simpler examples. A user can focus more on what it actually

does than miscellaneous stuff. A user can launch an example very

easily.

  1. … 149 more files in changeset.
Fix a problem where web socket examples do not work

- Fix wrong class names in run-example.sh

- Fix incorrect web socket url generation

  1. … 1 more file in changeset.
Use maven-antrun-plugin instead of exec-maven-plugin

Motivation:

exec-maven-plugin does not flush stdout and stderr, making the console

output from the examples invisible to users

Modification:

Use maven-antrun-plugin instead

Result:

A user sees the output from the examples immediately.

  1. … 3 more files in changeset.
Use maven-antrun-plugin instead of exec-maven-plugin

Motivation:

exec-maven-plugin does not flush stdout and stderr, making the console

output from the examples invisible to users

Modification:

Use maven-antrun-plugin instead

Result:

A user sees the output from the examples immediately.

  1. … 3 more files in changeset.
Use maven-antrun-plugin instead of exec-maven-plugin

Motivation:

exec-maven-plugin does not flush stdout and stderr, making the console

output from the examples invisible to users

Modification:

Use maven-antrun-plugin instead

Result:

A user sees the output from the examples immediately.

  1. … 3 more files in changeset.
Use maven-antrun-plugin instead of exec-maven-plugin

Motivation:

exec-maven-plugin does not flush stdout and stderr, making the console

output from the examples invisible to users

Modification:

Use maven-antrun-plugin instead

Result:

A user sees the output from the examples immediately.

  1. … 2 more files in changeset.
Fix an incorrect path problem in run-example.sh