Created
September 3, 2011 10:06
-
-
Save oshothebig/1190950 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ChannelPipeline getPipeline() throws Exception { | |
ChannelPipeline pipeline = Channels.pipeline(); | |
// add the binary codec combination first | |
pipeline.addLast("framer", new LengthFieldBasedFrameDecoder( | |
MAXIMUM_PACKET_LENGTH, LENGTH_FIELD_OFFSET, LENGTH_FIELD_LENGTH, LENGTH_FIELD_MODIFICATION, 0)); | |
pipeline.addLast("decoder", new OpenFlowDecoder()); | |
pipeline.addLast("encoder", new OpenFlowEncoder()); | |
// add then the business logic | |
pipeline.addLast("handler", new OpenFlowSimpleControllerHandler(controller)); | |
return pipeline; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment