org.jnetstream.protocol
Interface BindingResolver

All Known Subinterfaces:
ProtocolBinding

public interface BindingResolver

Resolves a binding to a protocol. The implementing object supplies the neccessary logic to figure out if the binding either passes the resolve(com.slytechs.utils.memory.BitBuffer, int, int) test or not.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Method Summary
 int resolve(com.slytechs.utils.memory.BitBuffer buffer, int source, int sink)
          Runs the condition check of the binding.
 

Method Detail

resolve

int resolve(com.slytechs.utils.memory.BitBuffer buffer,
            int source,
            int sink)
Runs the condition check of the binding.

Parameters:
buffer - buffer containing packet data
source - offset of the source protocol
sink - offset of the sink protocol
Returns:
the length of the sink header or -1 if the binding condition failed