⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configuration.java

📁 First of all, the Applet-phone is a SIP User-Agent with audio and text messaging capabilities. But
💻 JAVA
字号:
/* * Configuration.java * * Created on February 3, 2003, 3:21 PM */package gov.nist.examples.bps.reader;import java.util.*;/****@version  JAIN-SIP-1.1**@author Olivier Deruelle <deruelle@nist.gov>  <br/>**<a href="{@docRoot}/uncopyright.html">This code is in the public domain.</a>**/public class Configuration {        // Stack:    public String stackName;    public String stackIPAddress;    public String outboundProxy;    public String routerPath;    public String extensionMethods;    public String retransmissionFilter;    public String stopTime;    public String maxConnections;    public String maxServerTransactions;    public String threadPoolSize;        // Base reader:    public String serialPortIdentifier;    public int serialLocalPort;    public boolean serialDebug;    public String baseReaderIdentifier;    public String baseReaderLocation;    public String baseReaderRange;        // Logging    public boolean enableDebug;    public String serverLogFile;    public String badMessageLogFile;    public String debugLogFile;    public String outputProxy;        // Listening points:    public Hashtable listeningPoints;        private int counter;        /** Creates a new instance of Configuration */    public Configuration() {        counter=0;        listeningPoints=new Hashtable();    }      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;    }              protected boolean check(String s) {        return  (s!=null && !s.trim().equals(""));    }        protected boolean check(int i) {        return i>=1099;    }            public boolean isValidConfiguration() {              if  ( !check(stackName) ||             !check(stackIPAddress) ||             listeningPoints.isEmpty()             ) {             System.out.println		("ERROR, the configuration file is not valid: Problem with"+                " the stack tag and stack parameters");            return false;       }       if  ( !check(serialPortIdentifier) ||             !check(serialLocalPort)              ) {             System.out.println		("ERROR, the configuration file is not valid: Problem with"+                " the base reader tag.");            return false;       }       return true;    }    }

⌨️ 快捷键说明

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