Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.zeroconf.jmdns
Class DNSEntry

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.zeroconf.jmdns.DNSEntry
Direct Known Subclasses:
DNSQuestion, DNSRecord

public class DNSEntry
extends Object

DNS entry with a name, type, and class. This is the base class for questions and records.

Version:
%I%, %G%
Author:
Arthur van Hoff, Pierre Frisch, Rick Blair

Field Summary
(package private)  int clazz
           
(package private)  String key
           
(package private)  String name
           
(package private)  int type
           
(package private)  boolean unique
           
 
Constructor Summary
DNSEntry(String name, int type, int clazz)
          Create an entry.
 
Method Summary
 boolean equals(Object obj)
          Check if two entries have exactly the same name, type, and class.
 int getClazz()
           
(package private) static String getClazz(int clazz)
          Get a string given a clazz.
 String getName()
           
 int getType()
           
(package private) static String getType(int type)
          Get a string given a type.
 int hashCode()
          Overriden, to return a value which is consistent with the value returned by equals(Object).
 boolean isUnique()
           
 String toString(String hdr, String other)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

String key

name

String name

type

int type

clazz

int clazz

unique

boolean unique
Constructor Detail

DNSEntry

DNSEntry(String name,
         int type,
         int clazz)
Create an entry.

Method Detail

equals

public boolean equals(Object obj)
Check if two entries have exactly the same name, type, and class.

Overrides:
equals in class Object

getName

public String getName()

getType

public int getType()

getClazz

public int getClazz()

isUnique

public boolean isUnique()

hashCode

public int hashCode()
Overriden, to return a value which is consistent with the value returned by equals(Object).

Overrides:
hashCode in class Object

getClazz

static String getClazz(int clazz)
Get a string given a clazz.


getType

static String getType(int type)
Get a string given a type.


toString

public String toString(String hdr,
                       String other)

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.