stackconfiguration.java

来自「First of all, the Applet-phone is a SIP 」· Java 代码 · 共 75 行

JAVA
75
字号
/* * StackConfiguration.java * * Created on May 22, 2003, 10:08 AM */package gov.nist.examples.bps.gateway;import java.util.*;/** * * @author  deruelle */public class StackConfiguration {        // Stack:    public String stackName;    public String stackIPAddress;    public String outboundProxy;    public String routerPath;    public String extensionMethods;    public String retransmissionFilter;    public String maxConnections;    public String maxServerTransactions;    public String threadPoolSize;       // Listening points:    public Hashtable listeningPoints;      private int counter;          /** Creates a new instance of StackConfiguration */    public StackConfiguration() {          counter=0;          listeningPoints=new Hashtable();    }        protected boolean check(String s) {        return  (s!=null && !s.trim().equals(""));    }        public void addListeningPoint(String port,String transport) {        if (check(port) && check(transport) ) {            counter++;            listeningPoints.put		("listeningPoint"+counter,new Association(port,transport) );        }    }             public Vector getListeningPoints() {        if (listeningPoints!=null) {            Collection c = listeningPoints.values();           return new Vector(c);        }        return null;    }        public boolean isValidConfiguration() {                if  ( check(stackName) &&        check(stackIPAddress) &&        !listeningPoints.isEmpty()        ) {            return true;        }        else {            System.out.println            ("ERROR, the configuration is not valid: Problem with"+            " the stack tag and stack parameters");            return false;        }            }    }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?