All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.nodeos.pj_InetAddressMask
java.lang.Object
   |
   +----edu.utah.janos.nodeos.pj_InetAddressMask

  Summary

class  pj_InetAddressMask
     extends java.lang.Object
{
          // Fields 4
     private int address;
     private int addressMask;
     private String nameMask;
     private String[] nameTokens;

          // Constructors 1
     pj_InetAddressMask(String) throws UnknownHostException, NumberFormatException;

          // Methods 5
     public boolean equals(Object);
     public int hashCode();
     boolean match(InetAddress);
     int priority();
     public String toString();
}

Class that can be used to select InetAddress based on a mask with wildcards.

PART OF THE PURE JAVA NODEOS IMPLEMENTATION.

Author:
Janos Ministry of Development




  Fields

· address

Summary  |  Top

   private int address

Address value


· nameMask

Summary  |  Top
   private String nameMask

If not null, then nameMask is a host name with or without wildcards.

XXX nameMask overrides the address masks?


· nameTokens

Summary  |  Top
   private String[] nameTokens

Because the nameMask is only set in the constructor, the tokenization of it should be cached for comparison later


· addressMask

Summary  |  Top
   private int addressMask

Bitmask telling us which parts of address are valid, if the bit is on then we match the corresponding 8 bits in address. If the bit is off then anything matches.


  Constructors

· pj_InetAddressMask

Summary  |  Top

   pj_InetAddressMask(String addr)  throws UnknownHostException, NumberFormatException

Construct an address mask from the given string



  Methods

· equals

Summary  |  Top
   public boolean equals(Object o) 
Overrides:
equals in class Object


· hashCode

Summary  |  Top
   public int hashCode() 

Return the hashCode for the name string, if there is one, otherwise just use the address integer

Overrides:
hashCode in class Object


· priority

Summary  |  Top
   int priority() 

Return a value that can be used when prioritizing pj_InetAddressMasks.

Used by the UDPLayer to distinguish overlapping packet handlers.



· toString

Summary  |  Top
   public String toString() 
Overrides:
toString in class Object


· match

Summary  |  Top
   boolean match(InetAddress ia) 

Test for a match between the given inet address and the mask



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7