Interface Channel.VersionTest

Enclosing class:
Channel<MSG>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Channel.VersionTest
  • Field Details

  • Method Details

    • exact

      static Channel.VersionTest exact(int version)
    • accepts

      boolean accepts(Channel.VersionTest.Status status, int version)
      Tests is the specified version is compatible with this channel. This determines if a we can communicate with a remote end. The status parameter specifies wither or not the remote knows about out channel or not. If the value is MISSING or VANILLA then the version parameter is meaningless. If the status is
      invalid reference
      PRESSENT
      then the version parameter is the version presented by the remote connection.
      Returns:
      true if we should allow the connection
    • negate

      default Channel.VersionTest negate()
      Returns a instance that represents the logical negation of this instance.
    • and

      Returns a composed instance that represents a short-circuiting logical AND of this instance and another. When evaluating the composed instance, if this instance is false, then the other instance is not evaluated.
    • or

      Returns a composed instance that represents a short-circuiting logical OR of this instance and another. When evaluating the composed instance, if this instance is true, then the other instance is not evaluated.