com.h3c.of.ctl

## Interface SubComponentService

-     public interface SubComponentService

  Defines an API that may be implemented by controller sub-components to allow "helper" classes to interact with them. The `SubComponentListener` API defines callbacks that may be invoked for datapath events and message events. It is up to the `SubComponentService` implementation to determine which events received from the lower controller components should be forwarded to its sub-component listeners.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addListener(SubComponentListener listener)` Adds the specified listener to the sub-component service.
    `void` | `removeListener(SubComponentListener listener)` Removes the specified listener from the sub-component service.
    `void` | `send(OpenflowMessage msg, DataPathId dpid)` Sends the specified message to the specified datapath, via the sub-component.

- - ### Method Detail

    - #### addListener

          void addListener(SubComponentListener listener)

      Adds the specified listener to the sub-component service.
      Parameters:
        `listener` - the listener to be added
      Throws:
        `NullPointerException` - if listener is null

    - #### removeListener

          void removeListener(SubComponentListener listener)

      Removes the specified listener from the sub-component service.
      Parameters:
        `listener` - the listener to be removed
      Throws:
        `NullPointerException` - if listener is null

    - #### send

          void send(OpenflowMessage msg,
                  DataPathId dpid)
                    throws OpenflowException

      Sends the specified message to the specified datapath, via the sub-component.
      Parameters:
        `msg` - the OpenFlow message to send
        `dpid` - the OpenFlow datapath to which the message is to be sent
      Throws:
        `NullPointerException` - if either parameter is null
        `IllegalArgumentException` - if msg is mutable
        `OpenflowException` - if there was a problem encoding or sending the message

Copyright © 2014. All Rights Reserved.