FileDocCategorySizeDatePackage
AdminInstance.javaAPI DocGlassfish v2 API6698Fri May 04 22:34:56 BST 2007com.sun.enterprise.tools.common.deploy

AdminInstance

public class AdminInstance extends Object implements Serializable
author
nityad
version

Fields Summary
private String
host_name
private static String
pw_editor
private transient PropertyChangeSupport
propertySupport
private String
name
private int
port_no
private String
path
private String
userName
Holds value of property userName.
private String
password
Constructors Summary
public AdminInstance(String host, int port, String path)

        this(host,port,path,null,null);
    
public AdminInstance(String host, int port, String path, String userName, String password)

        propertySupport = new PropertyChangeSupport ( this );
        this.host_name = host;
        this.port_no = port;
        this.name = host_name + ":" + port_no;//NOI18N
        this.path = path;
        this.userName = userName;
        this.password = password;
    
Methods Summary
public static booleanAdminServName(java.lang.String host, int port, java.util.List admin)

       boolean exists = false;  
       String value = host + ":" + port;//NOI18N
       for(int i=0; i<admin.size(); i++){
        IAdminInstanceBean instance = (IAdminInstanceBean) admin.get(i);
        String inst = instance.getName();
        if(inst.equals(value))
           exists = true;
       }//for 
       return exists;
    
public voidaddPropertyChangeListener(java.beans.PropertyChangeListener listener)

        initPropertyChangeSupport();
           
        propertySupport.addPropertyChangeListener (listener);
    
public java.lang.StringgetHost()

        return this.host_name;
    
public java.lang.StringgetName()

        return this.name;
    
public java.lang.StringgetPassword()
Getter for property password.

return
Value of property password.

        pw_editor = password;
        return password;
    
public java.lang.StringgetPath()

        return this.path;
    
public intgetPort()

        return this.port_no;
    
public java.lang.StringgetPrivatePassword()
invisible Getter for property password.

return
****

        String pw = getPassword();
        String passw = "";//NOI18N
        for(int i=0; i<pw.length(); i++)
            passw = passw + "*";//NOI18N
        return passw;
    
public java.lang.StringgetUserName()
Getter for property userName.

return
Value of property userName.

        return userName;
    
private voidinitPropertyChangeSupport()

         if(propertySupport==null)
         propertySupport = new PropertyChangeSupport ( this );

    
public voidremovePropertyChangeListener(java.beans.PropertyChangeListener listener)

        initPropertyChangeSupport();
        propertySupport.removePropertyChangeListener (listener);
    
public voidsetHost(java.lang.String value)

        String oldValue = host_name;
        this.host_name = value;
        initPropertyChangeSupport();
        propertySupport.firePropertyChange ("host", oldValue, host_name);//NOI18N
    
public voidsetName(java.lang.String value)

        String oldValue = name;
        this.name = value;
        initPropertyChangeSupport();
        propertySupport.firePropertyChange ("name", oldValue, name);//NOI18N
    
public voidsetPassword(java.lang.String value)
Setter for property password.

param
password New value of property password.

        String oldValue = password;
        password = value;
        initPropertyChangeSupport();
        propertySupport.firePropertyChange ("password", oldValue, password);//NOI18N
    
public voidsetPath(java.lang.String value)

        String oldValue = path;
        this.path = value;
        initPropertyChangeSupport();
        propertySupport.firePropertyChange ("path", oldValue, path);//NOI18N
    
public voidsetPort(int value)

        int oldValue = port_no;
        this.port_no = value;
        initPropertyChangeSupport();
        propertySupport.firePropertyChange ("port", oldValue, port_no);//NOI18N
    
public voidsetUserName(java.lang.String value)
Setter for property userName.

param
userName New value of property userName.

        String oldValue = host_name;
        userName = value;
        initPropertyChangeSupport();
        propertySupport.firePropertyChange ("userName", oldValue, userName);//NOI18N