com.h3c.of.sw

## Class SwMessageHandler

- java.lang.Object
- - org.jboss.netty.channel.SimpleChannelUpstreamHandler
  - - com.h3c.of.sw.SwMessageHandler

- All Implemented Interfaces:
    org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler

      public class SwMessageHandler
      extends org.jboss.netty.channel.SimpleChannelUpstreamHandler

  Handles incoming OpenFlow messages for the mock-switch.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler

      `org.jboss.netty.channel.ChannelHandler.Sharable`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SwMessageHandler(MockOpenflowSwitch sw)` Constructs a mock-switch message handler.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ChannelStateEvent e)`
    `void` | `exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.ExceptionEvent e)` Invoked when an exception was raised by an I/O thread or a `ChannelHandler`.
    `void` | `messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent e)`
    `protected void` | `processError(OfmError msg)`
    `protected void` | `processFeaturesRequest(OfmFeaturesRequest msg)`
    `protected void` | `processHello(OfmHello msg)`
    `protected void` | `processMultipartRequest(OfmMultipartRequest msg)`

    - ### Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler

      `channelBound, channelClosed, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, handleUpstream, writeComplete`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SwMessageHandler

          public SwMessageHandler(MockOpenflowSwitch sw)

      Constructs a mock-switch message handler.
      Parameters:
        `sw` - the switch for which we handle messages

  - ### Method Detail

    - #### channelConnected

          public void channelConnected(org.jboss.netty.channel.ChannelHandlerContext ctx,
                              org.jboss.netty.channel.ChannelStateEvent e)
                                throws Exception

      Overrides:
        `channelConnected` in class `org.jboss.netty.channel.SimpleChannelUpstreamHandler`
      Throws:
        `Exception`

    - #### exceptionCaught

          public void exceptionCaught(org.jboss.netty.channel.ChannelHandlerContext ctx,
                             org.jboss.netty.channel.ExceptionEvent e)
                               throws Exception

      Invoked when an exception was raised by an I/O thread or a `ChannelHandler`.
      Overrides:
        `exceptionCaught` in class `org.jboss.netty.channel.SimpleChannelUpstreamHandler`
      Throws:
        `Exception`

    - #### messageReceived

          public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
                             org.jboss.netty.channel.MessageEvent e)
                               throws Exception

      Overrides:
        `messageReceived` in class `org.jboss.netty.channel.SimpleChannelUpstreamHandler`
      Throws:
        `Exception`

    - #### processHello

          protected void processHello(OfmHello msg)

    - #### processError

          protected void processError(OfmError msg)

    - #### processFeaturesRequest

          protected void processFeaturesRequest(OfmFeaturesRequest msg)

    - #### processMultipartRequest

          protected void processMultipartRequest(OfmMultipartRequest msg)

Copyright © 2014. All Rights Reserved.