Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.
pfisterer edited this page May 6, 2011 · 10 revisions

Netty HandlerStack

A set of netty handlers including Factories for easy (re-)configuration of protocol handler pipelines.

Protocols, Encoders and Decoders

The following protocols including encoders and decoders exist currently:

Mode of operation

The basic idea of this project is that you have a set of handlers (i.e., a JBoss Netty pipeline) that can be changed easily at run-time. To use this handler-chain, you need to supply a "left" and a "right" handler of this pipeline. The left handler is on the top of this protocol stack while the right handler on the bottom.

Usage

To start, create an instance of a HandlerFactoryRegistry you need to create a factory and register protocols with it. By default, you should register all protocols contained within this project with the registry:

import de.uniluebeck.itm.netty.handlerstack.HandlerFactoryRegistry; 
import de.uniluebeck.itm.netty.handlerstack.protocolcollection.ProtocolCollection;

HandlerFactoryRegistry factoryRegistry = new HandlerFactoryRegistry();
ProtocolCollection.registerProtocols(factoryRegistry);

Following, you

To use netty-handlerstack with Maven, edit your pom.xml and add the following dependencies (and replace ${dependency.netty.handlerstack.version} with the actual version to use):

<dependencies>
    [...]
		<dependency>
			<groupId>de.uniluebeck.itm.netty.handlerstack</groupId>
			<artifactId>factory</artifactId>
			<version>${dependency.netty.handlerstack.version}</version>
		</dependency>
		<dependency>
			<groupId>de.uniluebeck.itm.netty.handlerstack</groupId>
			<artifactId>channel-flange</artifactId>
			<version>${dependency.netty.handlerstack.version}</version>
		</dependency>
		<dependency>
			<groupId>de.uniluebeck.itm.netty.handlerstack</groupId>
			<artifactId>protocol-collection</artifactId>
			<version>${dependency.netty.handlerstack.version}</version>
		</dependency>
    [...]
</dependencies>

and add the following repositories

<repositories>
    [...]
	<repository>
		<id>itm-maven-repository-releases</id>
		<url>http://www.itm.uni-luebeck.de/projects/maven/releases/</url>
		<releases>
			<enabled>true</enabled>
		</releases>
		<snapshots>
			<enabled>false</enabled>
		</snapshots>
	</repository>

	<repository>
		<id>itm-maven-repository-snapshots</id>
		<url>http://www.itm.uni-luebeck.de/projects/maven/snapshots/</url>
		<releases>
			<enabled>false</enabled>
		</releases>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
    [...]

</repositories>

and finally add the following plug-in repositories:

<pluginRepositories>

	<pluginRepository>
		<id>itm-maven-plugin-repository-releases</id>
		<url>http://www.itm.uni-luebeck.de/projects/maven/releases/</url>
	</pluginRepository>

</pluginRepositories>