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

ContactData

public class ContactData extends Object implements Serializable, Cloneable
Instances of this class represent the minimum data needed to contact an adminstration server remotely.

Instances of this class are immutable.

author
Toby H Ferguson
version
$Revision: 1.5 $

Fields Summary
private String
host
private String
port
private boolean
useSSL
Constructors Summary
public ContactData(String host, String port, boolean useSSL)
Construct an instance from the given arguments.

param
host the host name on which the admin server is running.
param
port the port on which the admin server can be contacted
param
useSSL indicate whether SSL should be used to contact the admin server
throws
NullPointerException if either host or port are null

	
	checkNull(host);
	this.host = host;
	checkNull(port);
	this.port = port;
	this.useSSL = useSSL;
  
Methods Summary
private voidcheckNull(java.lang.String s)

	if (s == null) {
	  throw new NullPointerException();
	}
  
public java.lang.Objectclone()

	try {
	  return super.clone();
	}
	catch (CloneNotSupportedException e){ return null;}
  
  
public java.lang.StringgetHost()
Get the host of the receiver

return
the host of the receiver

	return this.host;
  
public java.lang.StringgetPort()
Get the port of the receiver

return
the port of the receiver

	return this.port;
  
public inthashCode()

	final String s = host+port+(useSSL ? "t" : "f");
	return s.hashCode();
  
public booleanuseSSL()
Indicate if ssl should be used to communicate to the admin server

return
true iff ssl should be used to communicate to the admin server

	return this.useSSL;