FileDocCategorySizeDatePackage
DomainEntry.javaAPI DocGlassfish v2 API4380Fri May 04 22:33:32 BST 2007com.sun.enterprise.admin.common.domains.registry

DomainEntry

public final class DomainEntry extends Object implements Serializable, Cloneable
This class represents the data required to be registered for each domain so that invariants between domains can be maintained, and communication to domains established.

Instances of this class are immutable - they are simply data carriers.

author
Toby H Ferguson
version
$Revision: 1.5 $

Fields Summary
private String
name
private File
root
private String
path
private ContactDataSet
contactData
Constructors Summary
public DomainEntry(String name, File root, ContactDataSet contactData)
Construct an immutable instance

param
name the name of the domain
param
root the root of the domain
param
contactData the data used to contact the domain
throws
NullPointerException if any argument is null

	if (name == null || root == null || contactData == null) {
	  throw new NullPointerException();
	}
	this.name = name;
	this.root = root;
        try
        {
	    this.path = root.getCanonicalPath();
        }
        catch(IOException ioe)
        {
	    this.path = root.getAbsolutePath();
        }	
	this.contactData = contactData;
  
Methods Summary
public java.lang.Objectclone()

	try {
	  return super.clone();
	}
	catch (CloneNotSupportedException c){
	  return null;
	}
  
public booleanequals(java.lang.Object rhs)

	return rhs != null && rhs instanceof DomainEntry && this.equals((DomainEntry) rhs);
  
private booleanequals(com.sun.enterprise.admin.common.domains.registry.DomainEntry rhs)

	return rhs != null && this == rhs ||
	(this.name.equals(rhs.name) && this.root.equals(rhs.root));
  
public ContactDataSetgetContactData()
Get the contact data of the receiver

return
the contact data of the receiver

	return this.contactData;
  
public java.lang.StringgetName()
Get the name of the receiver

return
the name of the receiver

	return this.name;
  
public java.lang.StringgetPath()
Get the path of the receiver

return
the path of the receiver

	return this.path;
  
public java.io.FilegetRoot()
Get the root of the receiver

return
the root of the receiver

	return this.root;
  
public inthashCode()

	final String s = this.name+this.root.toString();
	return s.hashCode();