FileDocCategorySizeDatePackage
ASSocketServiceConfig.javaAPI DocGlassfish v2 API4394Fri May 04 22:35:50 BST 2007com.sun.enterprise.server.ss

ASSocketServiceConfig

public class ASSocketServiceConfig extends Object
Helper class representing configuration of one Socket Service.
see
ASSocketService

Fields Summary
private com.sun.enterprise.config.ConfigBean
config
private String
addressTag
private String
portTag
private int
port
private int
backlog
private String
address
private SocketAddress
sAddress
private boolean
startSelector
Constructors Summary
ASSocketServiceConfig(com.sun.enterprise.config.ConfigBean config)


      
        this.config = config;
    
Methods Summary
java.lang.StringgetAddress()

        if ("any".equals(this.address) || "ANY".equals(this.address)
            || "INADDR_ANY".equals(this.address)) {
            return null;
        } else {
            return this.address;
        }
    
java.lang.StringgetAddressTag()

        return this.addressTag;
    
intgetBacklog()

        if (this.backlog < 0) {
            return 0;
        } else {
            return this.backlog;
        }
    
intgetPort()

        return this.port;
    
java.lang.StringgetPortTag()

        return this.portTag;
    
java.net.SocketAddressgetSocketAddress()

        return this.sAddress;
    
booleangetStartSelector()

        return this.startSelector;
    
voidinit()

        this.port = Integer.parseInt(config.getAttributeValue(getPortTag()));

        if (getAddressTag() != null) {
            this.address = config.getAttributeValue(getAddressTag());
        }

        String address = getAddress();
        if (address != null) {
            this.sAddress = new InetSocketAddress(address, getPort());
        } else {
            this.sAddress = new InetSocketAddress(getPort());
        }
    
voidsetAddressTag(java.lang.String addressTag)

        this.addressTag = addressTag;
    
voidsetBacklog(int backlog)

        this.backlog = backlog;
    
voidsetPortTag(java.lang.String portTag)

        this.portTag = portTag;
    
voidsetStartSelector(boolean flag)

        this.startSelector = flag;
    
public java.lang.StringtoString()

        return getAddress() + ":" + getPort();