com.aelitis.azureus.core.networkmanager
Interface NetworkManager.ByteMatcher

Enclosing class:
NetworkManager

public static interface NetworkManager.ByteMatcher

Byte stream match filter for routing.


Method Summary
 byte[][] getSharedSecrets()
           
 int getSpecificPort()
           
 Object matches(TransportHelper transport, ByteBuffer to_compare, int port)
          Check byte stream for match.
 int matchThisSizeOrBigger()
          Number of bytes of buffer at or beyond which the "match" method will be called to test for a match
 int maxSize()
          Get the max number of bytes this matcher requires.
 Object minMatches(TransportHelper transport, ByteBuffer to_compare, int port)
          Check for a minimum match
 int minSize()
          Get the minimum number of bytes required to determine if this matcher applies
 

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

Object matches(TransportHelper transport,
               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

Object minMatches(TransportHelper transport,
                  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()