Interface NetworkManager.ByteMatcher

  • Enclosing class:
    NetworkManager

    public static interface NetworkManager.ByteMatcher
    Byte stream match filter for routing.
    • Method Detail

      • matchThisSizeOrBigger

        int matchThisSizeOrBigger()
        Number of bytes of buffer at or beyond which the "match" method will be called to test for a match
        Returns:
      • maxSize

        int maxSize()
        Get the max number of bytes this matcher requires. If it fails with this (or more) bytes then the connection will be dropped
        Returns:
        size in bytes
      • minSize

        int minSize()
        Get the minimum number of bytes required to determine if this matcher applies
        Returns:
      • matches

        java.lang.Object matches​(TransportHelper transport,
                                 java.nio.ByteBuffer to_compare,
                                 int port)
        Check byte stream for match.
        Parameters:
        address - the originator of the connection
        to_compare -
        Returns:
        return "routing data" in case of a match, null otherwise
      • minMatches

        java.lang.Object minMatches​(TransportHelper transport,
                                    java.nio.ByteBuffer to_compare,
                                    int port)
        Check for a minimum match
        Parameters:
        to_compare -
        Returns:
        return "routing data" in case of a match, null otherwise
      • getSharedSecrets

        byte[][] getSharedSecrets()
      • getSpecificPort

        int getSpecificPort()