org.jnetpcap.packet
Class JBinding.DefaultJBinding

java.lang.Object
  extended by org.jnetpcap.packet.JBinding.DefaultJBinding
All Implemented Interfaces:
JBinding, JDependency
Enclosing interface:
JBinding

public abstract static class JBinding.DefaultJBinding
extends java.lang.Object
implements JBinding

An abstract adaptor that provides a default implementation for a binding.

Author:
Mark Bednarczyk, Sly Technologies, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jnetpcap.packet.JBinding
JBinding.DefaultJBinding
 
Field Summary
 
Fields inherited from interface org.jnetpcap.packet.JBinding
NULL_ID
 
Constructor Summary
JBinding.DefaultJBinding(int myId, int targetId, int... dependencyIds)
          Initializes a binding with source ID, target ID and any additional dendency IDs that need to be specified.
 
Method Summary
 int getId()
          Protocol header ID for this binding.
 int getTargetId()
          Protocol header ID to which this binding is bound to.
 int[] listDependencies()
          A list of dependencies that a binding has.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jnetpcap.packet.JBinding
getSourceId, isBound
 

Constructor Detail

JBinding.DefaultJBinding

public JBinding.DefaultJBinding(int myId,
                                int targetId,
                                int... dependencyIds)
Initializes a binding with source ID, target ID and any additional dendency IDs that need to be specified.

Parameters:
myId - ID of the header that owns this binding
targetId - ID of the header to which this binding needs to be applied to. The target ID also becomes an automatic dependency since that is always the case.
dependencyIds - additional IDs of headers that are referenced in the binding expression
Method Detail

getId

public int getId()
Protocol header ID for this binding.

Returns:
numerical ID of the header as assigned by JRegistry

getTargetId

public int getTargetId()
Protocol header ID to which this binding is bound to.

Specified by:
getTargetId in interface JBinding
Returns:
numerical protocol ID as assigned by JRegistry

listDependencies

public int[] listDependencies()
A list of dependencies that a binding has.

Specified by:
listDependencies in interface JBinding
Returns:
list of depdencies