com.h3c.of.ctl

## Interface MessageSender

-     public interface MessageSender

  Defines the API for sending OpenFlow messages to datapaths.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<MessageFuture>` | `send(List<OpenflowMessage> msgs, DataPathId dpid)` Sends the specified list of messages (in order) to the specified datapath.
    `MessageFuture` | `send(OpenflowMessage msg, DataPathId dpid)` Sends the specified message to the specified datapath.

- - ### Method Detail

    - #### send

          MessageFuture send(OpenflowMessage msg,
                           DataPathId dpid)
                             throws OpenflowException

      Sends the specified message to the specified datapath. A message future is returned, to allow the caller to discover the outcome of the request once it has been satisfied.

      Important Note:
      The sending of FlowMod messages via this method is disallowed; use `ControllerService.sendFlowMod(com.h3c.of.lib.msg.OfmFlowMod, com.h3c.of.lib.dt.DataPathId)` instead.

      Parameters:
        `msg` - the OpenFlow message to send
        `dpid` - the OpenFlow datapath to which the message is to be sent
      Returns:
        a message future
      Throws:
        `NullPointerException` - if either parameter is null
        `IllegalArgumentException` - if msg is mutable, or if it is a FlowMod
        `OpenflowException` - if there was a problem encoding or sending the message

    - #### send

          List<MessageFuture> send(List<OpenflowMessage> msgs,
                                 DataPathId dpid)
                                   throws OpenflowException

      Sends the specified list of messages (in order) to the specified datapath. A list of message futures (one for each message) is returned, to allow the caller to discover the outcome of the requests once they have been satisfied.

      Important Note:
      The sending of FlowMod messages via this method is disallowed; use `ControllerService.sendFlowMod(com.h3c.of.lib.msg.OfmFlowMod, com.h3c.of.lib.dt.DataPathId)` instead.

      Parameters:
        `msgs` - the OpenFlow messages to send
        `dpid` - the OpenFlow datapath to which the messages are to be sent
      Returns:
        a list of message futures
      Throws:
        `NullPointerException` - if either parameter is null, or if any element in the list is null
        `IllegalArgumentException` - if any message in the list is mutable, or is a FlowMod
        `OpenflowException` - if there was a problem encoding or sending the messages

Copyright © 2014. All Rights Reserved.