Skip to content

Instantly share code, notes, and snippets.

@amit22786
Last active October 25, 2016 04:12
Show Gist options
  • Save amit22786/cf767acd6c457d9ad71917b5f95fc360 to your computer and use it in GitHub Desktop.
Save amit22786/cf767acd6c457d9ad71917b5f95fc360 to your computer and use it in GitHub Desktop.
/**
*
* @author amit
*/
public class TrackingpathProtocol extends BaseProtocol {
public TrackingpathProtocol() {
super("Trackingpath");
}
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("objectDecoder", new TrackingpathProtocolDecoder(TrackingpathProtocol.this));
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment