FileDocCategorySizeDatePackage
PortValidator.javaAPI DocGlassfish v2 API3010Fri May 04 22:24:30 BST 2007com.sun.enterprise.admin.servermgmt

PortValidator

public class PortValidator extends Validator
This validator ensures that the specified port is not in use.
author
kebbs

Fields Summary
private static final com.sun.enterprise.util.i18n.StringManager
_strMgr
Constructors Summary
public PortValidator(String name)
Creates a new instance of PortValidator


           
       
        super(name, java.lang.Integer.class);
    
Methods Summary
public voidvalidate(java.lang.Object obj)
Validates the given Port.

param
str Must be the absolute path of the File that will be validated.
throws
InvalidConfigException

        super.validate(obj);
        if (!NetUtils.isPortFree(((Integer)obj).intValue())) {
            throw new InvalidConfigException(
                _strMgr.getString("portValidator.in_use", obj));
        }