📄 jembossparams.java
字号:
}/**** Initialize the server redundancy data. This is a separate* method because the server info might not be initialized in* the constructor, but may be imported later from the command line.**/ protected void setupServerRedundancy() { if (!serverPublicList.equals("")) { if(debug) System.out.println("JembossParams: Redundant public servers\n " +serverPublicList); publicServerFailOver = true; StringTokenizer tok = new StringTokenizer(serverPublicList,"|"); while (tok.hasMoreTokens()) { String toks = tok.nextToken(); publicServers.add(toks); if(debug) System.out.println(" Entry " + toks); serverStatusHash.put(toks, new Integer(SERVER_OK)); } } if(!serverPrivateList.equals("")) { if(debug) System.out.println("JembossParams: Redundant private servers\n " +serverPrivateList); privateServerFailOver = true; StringTokenizer tok = new StringTokenizer(serverPrivateList,"|"); while (tok.hasMoreTokens()) { String toks = tok.nextToken(); privateServers.add(toks); if(debug) System.out.println(" Entry " + toks); serverStatusHash.put(toks,new Integer(SERVER_OK)); } } }/**** If using a proxy server**/ public boolean getUseProxy() { return useProxy; }/**** If using an https proxy server**/ public boolean getUseHTTPSProxy() { return useHTTPSProxy; }/**** If using a proxy server for a given URL* @param s the URL we wish to connect to**/ public boolean getUseProxy(String s) { if(proxyOverride) return useProxy; else { if(!useJavaProxy) return useProxy; else { boolean jp = true; if (useJavaNoProxy) { int ip = javaNoProxyEntries.size(); for(int j = 0 ; j<ip ; ++j) if(s.indexOf((String)javaNoProxyEntries.get(j).toString()) != -1) jp = false; } return jp; } } }/**** The name of the proxy server* @return name of the proxy host**/ public String getProxyHost() { if (proxyOverride) return proxyHost; else { if(!useJavaProxy) return proxyHost; else return javaProxyHost; } }/**** The port the proxy server listens on* @return proxy port number**/ public int getProxyPortNum() { if(proxyOverride) return proxyPortNum; else { if(!useJavaProxy) return proxyPortNum; else return javaProxyPortNum; } }/**** Determine if the a proxy server is being used for web browsing* @return true if using a proxy server for the browser**/ public boolean isBrowserProxy() { return useBrowserProxy; }/**** Get the name of the proxy server for the browser* @return the name of the proxy host**/ public String getBrowserProxyHost() { return browserProxyHost; }/**** The port number of the proxy server for the browser* @return proxy port number **/ public int getBrowserProxyPort() { return browserProxyPort; } public boolean isUseTFM() { return useTFM; } /**** If using authenticate with the proxy * @return true if unix authentication used**/ public boolean getUseProxyAuth() { return useProxyAuth; }/**** Username needed to use for the proxy server**/ public String getProxyAuthUser() { return proxyAuthUser; }/**** Password needed to use for the proxy server**/ public String getProxyAuthPasswd() { return proxyAuthPasswd; }/**** A description of the proxy settings* @return a description of the proxy settings**/ public String proxyDescription() { String pdesc = ""; if (proxyOverride) { if(useProxy) { String spnum = new Integer(proxyPortNum).toString(); pdesc = "Current Settings: " + "Proxy Host: " + proxyHost + " Proxy Port: " + spnum; } else pdesc = "No proxies, connecting direct."; } else { if (useJavaProxy) { pdesc = "Settings Imported from Java: " + "Proxy Host: " + javaProxyHost + " Proxy Port: " + javaProxyPort; if(useJavaNoProxy) pdesc = pdesc + "\nNo Proxy On: " + javaNoProxy; } else { if(useProxy) { String spnum = new Integer(proxyPortNum).toString(); pdesc = "Current Settings: " + "Proxy Host: " + proxyHost + " Proxy Port: " + spnum; } else pdesc = "No proxies, connecting direct."; } } return pdesc; }/**** Whether the main service requires authentication* @return true if the server is using unix authentication**/ public boolean getUseAuth() { return useAuth; }/**** Returns the URL of the public soap server* @return the public services URL**/ public String getPublicSoapURL() { return publicSoapURL; }/**** @return true if using a Jemboss server**/ public static boolean isJembossServer() { return jembossServer; }/**** @return true if using cygwin**/ public static boolean isCygwin() { if(cygwin == null || cygwin.equals("")) return false; else return true; }/**** Get the cygwin root * @return cygwin root**/ public static String getCygwinRoot() { return cygwin; }/**** Get the location of plplot* @return the location of plplot **/ public String getPlplot() { return plplot; }/**** Get the user home directory* @return the user home directory**/ public String getUserHome() { return userHome; }/**** Set the user home directory property* @param s the user home directory**/ public void setUserHome(String s) { userHome = s; }/**** Get the standalone results directory* @return the results directory**/ public String getResultsHome() { String fs = System.getProperty("file.separator"); if(!resultsHome.endsWith(fs)) resultsHome = resultsHome + fs; return resultsHome; }/**** Set the standalone results directoryproperty* @param s the results directory**/ public void setResultsHome(String s) { resultsHome = s; }/**** @return the documentation URL **/ public String getembURL() { return embURL; }/**** @return the location of the emboss data**/ public String getEmbossData() { return embossData; } /**** @return the location of the emboss binaries**/ public String getEmbossBin() { return embossBin; }/**** Get the path for emboss* @return the path for emboss**/ public String getEmbossPath() { return embossPath; }/**** Get the environment for emboss* @return the environment for emboss**/ public String getEmbossEnvironment() { embossEnvironment = embossEnvironment.trim(); embossEnvironment = embossEnvironment.replace(':',' '); embossEnvironment = embossEnvironment.replace(',',' '); return embossEnvironment; }/**** Get the emboss environment as a String array* @return the emboss environment as a String array**/ public String[] getEmbossEnvironmentArray(String[] envp) { embossEnvironment = embossEnvironment.trim(); embossEnvironment = embossEnvironment.replace(',',' '); if(embossEnvironment.equals("")) return envp; StringTokenizer st = new StringTokenizer(embossEnvironment," ");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -