com.h3c.of.ctl

## Class ControllerServiceAdapter

- java.lang.Object
- - com.h3c.of.ctl.ControllerServiceAdapter

- All Implemented Interfaces:
    ControllerService

      public class ControllerServiceAdapter
      extends Object
      implements ControllerService

  An adapter for the `ControllerService` API, provided specifically for unit tests to use, to insulate themselves from changes in the API.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ControllerServiceAdapter()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDataPathListener(DataPathListener listener)` Adds the specified datapath listener to the controller.
    `void` | `addFlowListener(FlowListener listener)` Adds the specified flow listener to the controller.
    `void` | `addGroupListener(GroupListener listener)` Adds the specified group listener to the controller.
    `void` | `addMessageListener(MessageListener listener, Set<MessageType> types)` Adds the specified message listener to the controller.
    `void` | `addMeterListener(MeterListener listener)` Adds the specified meter listener to the controller.
    `void` | `addPacketListener(SequencedPacketListener listener, PacketListenerRole role, int altitude)` Adds the specified packet listener to the packet sequencer, in the specified role and at the specified altitude.
    `void` | `addPacketListener(SequencedPacketListener listener, PacketListenerRole role, int altitude, Set<ProtocolId> interest)` Adds the specified packet listener to the sequencer, in the specified role and at the specified altitude.
    `MessageContext` | `createMsgContext(OpenflowEventType type, OpenflowMessage msg, DataPathId dpid, int auxId, ProtocolVersion pv)`
    `MessageContextForHost` | `createMsgContextForHost(MessageContext context, boolean bL3Forwarding)`
    `MessageContextForPath` | `createMsgContextForPath(MessageContext context, boolean bL3Forwarding)`
    `MessageFuture` | `enablePort(DataPathId dpid, BigPortNumber port, boolean enable)` Instructs the controller to enable or disable the given port on the specified datapath.
    `Set<DataPathInfo>` | `getAllDataPathInfo()` Returns information describing each of the OpenFlow datapaths currently connected to the controller.
    `ControllerMx` | `getControllerMx()` Returns an instance of the management interface.
    `DataPathInfo` | `getDataPathInfo(DataPathId dpid)` Returns information describing a specific OpenFlow datapath.
    `MBodyDesc` | `getDesc(DataPathInfo dpinfo)`
    `List<MBodyExperimenter>` | `getExperimenter(DataPathId dpid)` Returns meter configuration or statistics (for OF 1.0 datapaths), encoded in experimenter multipart replies.
    `List<MBodyFlowStats>` | `getFlowStats(DataPathId dpid, TableId tableId)` Returns flows installed in the specified table of the given datapath.
    `List<MBodyGroupDescStats>` | `getGroupDescription(DataPathId dpid)` Returns the group descriptions from the specified datapath.
    `MBodyGroupDescStats` | `getGroupDescription(DataPathId dpid, GroupId groupId)` Returns the group description for the given group ID, from the specified datapath.
    `MBodyGroupFeatures` | `getGroupFeatures(DataPathId dpid)` Returns the supported group features for the specified datapath.
    `List<MBodyGroupStats>` | `getGroupStats(DataPathId dpid)` Returns the group statistics from the specified datapath.
    `MBodyGroupStats` | `getGroupStats(DataPathId dpid, GroupId groupId)` Returns the group statistics for the given group ID, from the specified datapath.
    `List<MBodyMeterConfig>` | `getMeterConfig(DataPathId dpid)` Returns the meter configuration details from the specified datapath.
    `MBodyMeterConfig` | `getMeterConfig(DataPathId dpid, MeterId meterId)` Returns the meter configuration for the given meter ID, from the specified datapath.
    `MBodyMeterFeatures` | `getMeterFeatures(DataPathId dpid)` Returns the meter features for the specified datapath.
    `List<MBodyMeterStats>` | `getMeterStats(DataPathId dpid)` Returns the meter statistics from the specified datapath.
    `MBodyMeterStats` | `getMeterStats(DataPathId dpid, MeterId meterId)` Returns the meter statistics for the given meter ID, from the specified datapath.
    `List<SequencedPacketListener>` | `getPacketListeners(PacketListenerRole role)` Returns an ordered list of packet listeners registered with the packet sequencer, for the specified role.
    `PipelineDefinition` | `getPipelineDefinition(DataPathId dpId)` Returns the `PipelineDefinition` for the given datapath.
    `List<MBodyPortStats>` | `getPortStats(DataPathId dpid)` Returns the port statistics from the specified datapath.
    `MBodyPortStats` | `getPortStats(DataPathId dpid, BigPortNumber portNumber)` Returns the port statistics for the given port, from the specified datapath.
    `ControllerStats` | `getStats()` Returns statistical information about the controller.
    `void` | `removeDataPathListener(DataPathListener listener)` Removes the specified datapath listener from the controller.
    `void` | `removeFlowListener(FlowListener listener)` Removes the specified flow listener from the controller.
    `void` | `removeGroupListener(GroupListener listener)` Removes the specified group listener from the controller.
    `void` | `removeMessageListener(MessageListener listener)` Removes the specified message listener from the controller.
    `void` | `removeMeterListener(MeterListener listener)` Removes the specified meter listener from the controller.
    `void` | `removePacketListener(SequencedPacketListener listener)` Removes the specified packet listener from the packet sequencer.
    `List<MessageFuture>` | `send(List<OpenflowMessage> msgs, DataPathId dpid)` Instructs the controller to send the specified list of messages (in order) to the specified datapath.
    `MessageFuture` | `send(OpenflowMessage msg, DataPathId dpid)` Instructs the controller to send the specified message to the specified datapath.
    `MessageFuture` | `sendFlowMod(OfmFlowMod flowMod, DataPathId dpid)` Sends the given FlowMod message to the specified datapath.
    `MessageFuture` | `sendGroupMod(OfmGroupMod groupMod, DataPathId dpid)` Sends the given GroupMod message to the specified datapath.
    `MessageFuture` | `sendMeterMod(OfmMeterMod meterMod, DataPathId dpid)` Sends the given MeterMod message to the specified datapath.
    `ProtocolVersion` | `versionOf(DataPathId dpid)` Returns the (negotiated) protocol version of the specified datapath.

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

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

- - ### Constructor Detail

    - #### ControllerServiceAdapter

          public ControllerServiceAdapter()

  - ### Method Detail

    - #### addPacketListener

          public void addPacketListener(SequencedPacketListener listener,
                               PacketListenerRole role,
                               int altitude)

      Description copied from interface: `ControllerService`
      Adds the specified packet listener to the packet sequencer, in the specified role and at the specified altitude. Higher altitudes come earlier in the sequence than lower altitudes (within the specific role). Note that no two listeners (in the same role) may register with the same altitude; if this is attempted an exception will be thrown.

      The listener's `event()` callback will be invoked for every Packet-In message that the controller passes to the packet sequencer.

      Specified by:
        `addPacketListener` in interface `ControllerService`
      Parameters:
        `listener` - the listener to be added
        `role` - the role the listener wishes to assume
        `altitude` - the listener's altitude
      See Also:
        `ControllerService.addPacketListener(SequencedPacketListener, PacketListenerRole, int, Set)`

    - #### addPacketListener

          public void addPacketListener(SequencedPacketListener listener,
                               PacketListenerRole role,
                               int altitude,
                               Set<ProtocolId> interest)

      Description copied from interface: `ControllerService`
      Adds the specified packet listener to the sequencer, in the specified role and at the specified altitude. Higher altitudes come earlier in the sequence than lower altitudes (within the specific role). Note that no two listeners (in the same role) may register with the same altitude; if this is attempted an exception will be thrown.

      The `interest` argument specifies the protocols that the listener cares about. When the sequencer receives a Packet-In message, it will be forwarded to the listener if the packet contains any protocol that is a member of the specified set.

      Specified by:
        `addPacketListener` in interface `ControllerService`
      Parameters:
        `listener` - the listener to be added
        `role` - the role the listener wishes to assume
        `altitude` - the listener's altitude
        `interest` - the packet protocols the listener is interested in
      See Also:
        `ControllerService.addPacketListener(SequencedPacketListener, PacketListenerRole, int)`

    - #### removePacketListener

          public void removePacketListener(SequencedPacketListener listener)

      Description copied from interface: `ControllerService`
      Removes the specified packet listener from the packet sequencer.
      Specified by:
        `removePacketListener` in interface `ControllerService`
      Parameters:
        `listener` - the listener to be removed

    - #### getPacketListeners

          public List<SequencedPacketListener> getPacketListeners(PacketListenerRole role)

      Description copied from interface: `ControllerService`
      Returns an ordered list of packet listeners registered with the packet sequencer, for the specified role. The order of listeners is that of descending altitude.
      Specified by:
        `getPacketListeners` in interface `ControllerService`
      Parameters:
        `role` - the role to examine
      Returns:
        the packet listeners in this role

    - #### addMessageListener

          public void addMessageListener(MessageListener listener,
                                Set<MessageType> types)

      Description copied from interface: `ControllerService`
      Adds the specified message listener to the controller.

      The `types` argument specifies the types of message that the listener cares about. When the controller receives a message, it will be forwarded to the listener if and only if the message's type is a member of the specified set.

      An empty set (or null) is taken to mean that the listener wants to hear about every message, regardless of type. However, PacketIn messages are not forwarded in this case; see note below.

      If a listener calls this method when it is already registered, the specified set of message types completely replaces the original set.

      Important Note:
      PacketIn messages are processed exclusively by the packet sequencer. To participate in PacketIn processing, you must use `ControllerService.addPacketListener(SequencedPacketListener, PacketListenerRole, int, Set)`. Attempting to request PacketIn messages by including `PACKET_IN` in the `types` set will throw an exception.

      Specified by:
        `addMessageListener` in interface `ControllerService`
      Parameters:
        `listener` - the listener to be added
        `types` - the message types the listener cares about

    - #### removeMessageListener

          public void removeMessageListener(MessageListener listener)

      Description copied from interface: `ControllerService`
      Removes the specified message listener from the controller.
      Specified by:
        `removeMessageListener` in interface `ControllerService`
      Parameters:
        `listener` - the listener to be removed

    - #### addDataPathListener

          public void addDataPathListener(DataPathListener listener)

      Description copied from interface: `ControllerService`
      Adds the specified datapath listener to the controller.
      Specified by:
        `addDataPathListener` in interface `ControllerService`
      Parameters:
        `listener` - the listener to be added

    - #### removeDataPathListener

          public void removeDataPathListener(DataPathListener listener)

      Description copied from interface: `ControllerService`
      Removes the specified datapath listener from the controller.
      Specified by:
        `removeDataPathListener` in interface `ControllerService`
      Parameters:
        `listener` - the listener to be removed

    - #### getAllDataPathInfo

          public Set<DataPathInfo> getAllDataPathInfo()

      Description copied from interface: `ControllerService`
      Returns information describing each of the OpenFlow datapaths currently connected to the controller.
      Specified by:
        `getAllDataPathInfo` in interface `ControllerService`
      Returns:
        information describing all connected datapaths

    - #### getDataPathInfo

          public DataPathInfo getDataPathInfo(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns information describing a specific OpenFlow datapath. A `NotFoundException` will be thrown if there is no datapath connected to the controller with the given ID.
      Specified by:
        `getDataPathInfo` in interface `ControllerService`
      Parameters:
        `dpid` - the datapath id
      Returns:
        information describing the corresponding datapath

    - #### versionOf

          public ProtocolVersion versionOf(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the (negotiated) protocol version of the specified datapath. A `NotFoundException` will be thrown if there is no datapath connected to the controller with the given ID.
      Specified by:
        `versionOf` in interface `ControllerService`
      Parameters:
        `dpid` - the datapath ID
      Returns:
        the negotiated protocol version

    - #### getStats

          public ControllerStats getStats()

      Description copied from interface: `ControllerService`
      Returns statistical information about the controller.
      Specified by:
        `getStats` in interface `ControllerService`
      Returns:
        controller statistics

    - #### getPortStats

          public List<MBodyPortStats> getPortStats(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the port statistics from the specified datapath.

      Note that this is a synchronous call that blocks until all the port statistics replies have returned from the datapath.

      Specified by:
        `getPortStats` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of port statistics

    - #### getPortStats

          public MBodyPortStats getPortStats(DataPathId dpid,
                                    BigPortNumber portNumber)

      Description copied from interface: `ControllerService`
      Returns the port statistics for the given port, from the specified datapath.

      Note that this is a synchronous call that blocks until the port statistics reply has returned from the datapath.

      Specified by:
        `getPortStats` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
        `portNumber` - the target port
      Returns:
        the port statistics

    - #### enablePort

          public MessageFuture enablePort(DataPathId dpid,
                                 BigPortNumber port,
                                 boolean enable)

      Description copied from interface: `ControllerService`
      Instructs the controller to enable or disable the given port on the specified datapath. A message future is returned, to allow the caller to discover the outcome of the request once it has been satisfied.
      Specified by:
        `enablePort` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
        `port` - the target port
        `enable` - true to enable; false to disable
      Returns:
        a message future

    - #### send

          public MessageFuture send(OpenflowMessage msg,
                           DataPathId dpid)
                             throws OpenflowException

      Description copied from interface: `ControllerService`
      Instructs the controller to send 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.

      Specified by:
        `send` in interface `ControllerService`
      Parameters:
        `msg` - the OpenFlow message to send
        `dpid` - the OpenFlow datapath to which the message is to be sent
      Returns:
        a message future
      Throws:
        `OpenflowException` - if there was a problem encoding or sending the message

    - #### send

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

      Description copied from interface: `ControllerService`
      Instructs the controller to send 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.

      Specified by:
        `send` in interface `ControllerService`
      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:
        `OpenflowException` - if there was a problem encoding or sending the messages

    - #### getControllerMx

          public ControllerMx getControllerMx()
                                       throws AuthorizationException

      Description copied from interface: `ControllerService`
      Returns an instance of the management interface. For this method to succeed, the caller must be in the list of known authorized classes in `ControllerManagementAuthorizer`.
      Specified by:
        `getControllerMx` in interface `ControllerService`
      Returns:
        a handle on the management interface
      Throws:
        `AuthorizationException` - if the caller is not authorized

    - #### getFlowStats

          public List<MBodyFlowStats> getFlowStats(DataPathId dpid,
                                          TableId tableId)

      Description copied from interface: `ControllerService`
      Returns flows installed in the specified table of the given datapath. If the table ID is not given (i.e. `tableId` is `null`) then all tables are assumed.

      If the specified table ID is `TableId.ALL`, all flows from all tables will be returned. Note that table ID is ignored for OpenFlow 1.0 devices.

      Note that this is a synchronous call that blocks until all the flow statistics replies have returned from the datapath.

      Specified by:
        `getFlowStats` in interface `ControllerService`
      Parameters:
        `dpid` - the datapath from which the flows are requested
        `tableId` - the ID of the flow table
      Returns:
        the list of flow statistics

    - #### sendFlowMod

          public MessageFuture sendFlowMod(OfmFlowMod flowMod,
                                  DataPathId dpid)
                                    throws OpenflowException

      Description copied from interface: `ControllerService`
      Sends the given FlowMod 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.

      Adds the specified flow to the given datapath if the message's command is `ADD`. Deletes the specified flow from the given datapath if the message's command is `DELETE`.

      Specified by:
        `sendFlowMod` in interface `ControllerService`
      Parameters:
        `flowMod` - the FlowMod message to send
        `dpid` - the target datapath
      Returns:
        a message future
      Throws:
        `OpenflowException` - if there was an issue sending the message
      See Also:
        `FlowModCommand`

    - #### addFlowListener

          public void addFlowListener(FlowListener listener)

      Description copied from interface: `ControllerService`
      Adds the specified flow listener to the controller.
      Specified by:
        `addFlowListener` in interface `ControllerService`
      Parameters:
        `listener` - the flow listener to be added

    - #### removeFlowListener

          public void removeFlowListener(FlowListener listener)

      Description copied from interface: `ControllerService`
      Removes the specified flow listener from the controller.
      Specified by:
        `removeFlowListener` in interface `ControllerService`
      Parameters:
        `listener` - the flow listener to be removed

    - #### getGroupDescription

          public List<MBodyGroupDescStats> getGroupDescription(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the group descriptions from the specified datapath.

      Note that this is a synchronous call that blocks until all the group description replies have returned from the datapath.

      Specified by:
        `getGroupDescription` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of group descriptions

    - #### getGroupDescription

          public MBodyGroupDescStats getGroupDescription(DataPathId dpid,
                                                GroupId groupId)

      Description copied from interface: `ControllerService`
      Returns the group description for the given group ID, from the specified datapath.

      Note that this is a synchronous call that blocks until the group description reply has returned from the datapath.

      Specified by:
        `getGroupDescription` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
        `groupId` - the ID of the group
      Returns:
        the group description

    - #### getGroupStats

          public List<MBodyGroupStats> getGroupStats(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the group statistics from the specified datapath.

      Note that this is a synchronous call that blocks until all the group statistics replies have returned from the datapath.

      Specified by:
        `getGroupStats` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of group statistics

    - #### getGroupStats

          public MBodyGroupStats getGroupStats(DataPathId dpid,
                                      GroupId groupId)

      Description copied from interface: `ControllerService`
      Returns the group statistics for the given group ID, from the specified datapath.

      Note that this is a synchronous call that blocks until the group statistics reply has returned from the datapath.

      Specified by:
        `getGroupStats` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
        `groupId` - the target group ID
      Returns:
        the group statistics

    - #### getGroupFeatures

          public MBodyGroupFeatures getGroupFeatures(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the supported group features for the specified datapath.

      Note that this is a synchronous call that blocks until the group features reply has returned from the datapath.

      Specified by:
        `getGroupFeatures` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the group features

    - #### sendGroupMod

          public MessageFuture sendGroupMod(OfmGroupMod groupMod,
                                   DataPathId dpid)
                                     throws OpenflowException

      Description copied from interface: `ControllerService`
      Sends the given GroupMod 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.

      Adds the group entry to the specified datapath if the message's command is `ADD`. Modifies the group entry on the specified datapath if the message's command is `MODIFY`. Deletes the group entry from the specified datapath if the message's command is `DELETE`.

      Specified by:
        `sendGroupMod` in interface `ControllerService`
      Parameters:
        `groupMod` - the GroupMod message to send
        `dpid` - the target datapath
      Returns:
        a message future
      Throws:
        `OpenflowException` - if there was an issue sending the message
      See Also:
        `GroupModCommand`

    - #### addGroupListener

          public void addGroupListener(GroupListener listener)

      Description copied from interface: `ControllerService`
      Adds the specified group listener to the controller.
      Specified by:
        `addGroupListener` in interface `ControllerService`
      Parameters:
        `listener` - the group listener to be added

    - #### removeGroupListener

          public void removeGroupListener(GroupListener listener)

      Description copied from interface: `ControllerService`
      Removes the specified group listener from the controller.
      Specified by:
        `removeGroupListener` in interface `ControllerService`
      Parameters:
        `listener` - the group listener to be removed

    - #### getMeterConfig

          public List<MBodyMeterConfig> getMeterConfig(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the meter configuration details from the specified datapath.

      Note that this is a synchronous call that blocks until all the meter configuration replies have returned from the datapath.

      Specified by:
        `getMeterConfig` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of meter configurations

    - #### getMeterConfig

          public MBodyMeterConfig getMeterConfig(DataPathId dpid,
                                        MeterId meterId)

      Description copied from interface: `ControllerService`
      Returns the meter configuration for the given meter ID, from the specified datapath.

      Note that this is a synchronous call that blocks until all the meter configuration reply has returned from the datapath.

      Specified by:
        `getMeterConfig` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
        `meterId` - the ID of the meter
      Returns:
        the meter configuration

    - #### getMeterStats

          public List<MBodyMeterStats> getMeterStats(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the meter statistics from the specified datapath.

      Note that this is a synchronous call that blocks until all the meter statistics replies have returned from the datapath.

      Specified by:
        `getMeterStats` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of meter statistics

    - #### getMeterStats

          public MBodyMeterStats getMeterStats(DataPathId dpid,
                                      MeterId meterId)

      Description copied from interface: `ControllerService`
      Returns the meter statistics for the given meter ID, from the specified datapath.

      Note that this is a synchronous call that blocks until the meter statistics reply has returned from the datapath.

      Specified by:
        `getMeterStats` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
        `meterId` - the target meter ID
      Returns:
        the meter statistics

    - #### getMeterFeatures

          public MBodyMeterFeatures getMeterFeatures(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns the meter features for the specified datapath.

      Note that this is a synchronous call that blocks until the meter features reply has returned from the datapath.

      Specified by:
        `getMeterFeatures` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the meter features

    - #### getExperimenter

          public List<MBodyExperimenter> getExperimenter(DataPathId dpid)

      Description copied from interface: `ControllerService`
      Returns meter configuration or statistics (for OF 1.0 datapaths), encoded in experimenter multipart replies.

      Note that this is a synchronous call that blocks until the replies have returned from the datapath.

      Specified by:
        `getExperimenter` in interface `ControllerService`
      Parameters:
        `dpid` - the target datapath
      Returns:
        the list of configuations or statistics

    - #### sendMeterMod

          public MessageFuture sendMeterMod(OfmMeterMod meterMod,
                                   DataPathId dpid)
                                     throws OpenflowException

      Description copied from interface: `ControllerService`
      Sends the given MeterMod 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.

      Adds the meter to the specified datapath if the message's command is `ADD`. Modifies the meter on the specified datapath if the message's command is `MODIFY`. Deletes the meter from the specified datapath if the message's command is `DELETE`.

      Specified by:
        `sendMeterMod` in interface `ControllerService`
      Parameters:
        `meterMod` - the MeterMod message to send
        `dpid` - the target datapath
      Returns:
        a message future
      Throws:
        `OpenflowException` - if there was an issue sending the message
      See Also:
        `MeterModCommand`

    - #### addMeterListener

          public void addMeterListener(MeterListener listener)

      Description copied from interface: `ControllerService`
      Adds the specified meter listener to the controller.
      Specified by:
        `addMeterListener` in interface `ControllerService`
      Parameters:
        `listener` - the meter listener to be added

    - #### removeMeterListener

          public void removeMeterListener(MeterListener listener)

      Description copied from interface: `ControllerService`
      Removes the specified meter listener from the controller.
      Specified by:
        `removeMeterListener` in interface `ControllerService`
      Parameters:
        `listener` - the meter listener to be removed

    - #### getPipelineDefinition

          public PipelineDefinition getPipelineDefinition(DataPathId dpId)

      Description copied from interface: `ControllerService`
      Returns the `PipelineDefinition` for the given datapath.
      Specified by:
        `getPipelineDefinition` in interface `ControllerService`
      Parameters:
        `dpId` - the target datapath
      Returns:
        the pipeline definition for the given datapath

    - #### getDesc

          public MBodyDesc getDesc(DataPathInfo dpinfo)

      Specified by:
        `getDesc` in interface `ControllerService`
      Returns:

    - #### createMsgContext

          public MessageContext createMsgContext(OpenflowEventType type,
                                        OpenflowMessage msg,
                                        DataPathId dpid,
                                        int auxId,
                                        ProtocolVersion pv)

      Specified by:
        `createMsgContext` in interface `ControllerService`

    - #### createMsgContextForHost

          public MessageContextForHost createMsgContextForHost(MessageContext context,
                                                      boolean bL3Forwarding)

      Specified by:
        `createMsgContextForHost` in interface `ControllerService`

    - #### createMsgContextForPath

          public MessageContextForPath createMsgContextForPath(MessageContext context,
                                                      boolean bL3Forwarding)

      Specified by:
        `createMsgContextForPath` in interface `ControllerService`

Copyright © 2014. All Rights Reserved.