com.h3c.of.common

## Class HandshakeLogic

- java.lang.Object
- - com.h3c.of.common.HandshakeLogic

-     public class HandshakeLogic
      extends Object

  Provides common algorithms that both controller and switch need to utilize.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HandshakeLogic()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ProtocolVersion` | `negotiateVersion(OfmHello h1, OfmHello h2)` Determines the protocol version that is common to both HELLO messages; returns null if no such version exists.

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

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

- - ### Constructor Detail

    - #### HandshakeLogic

          public HandshakeLogic()

  - ### Method Detail

    - #### negotiateVersion

          public static ProtocolVersion negotiateVersion(OfmHello h1,
                                         OfmHello h2)

      Determines the protocol version that is common to both HELLO messages; returns null if no such version exists.

      See Section 6.3.1 "Connection Setup" of the 1.3.1 OpenFlow Spec.

      Parameters:
        `h1` - hello message one
        `h2` - hello message two
      Returns:
        the negotiated version

Copyright © 2014. All Rights Reserved.