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

📄 jembossrun.java

📁 emboss的linux版本的源代码
💻 JAVA
字号:
/**********************************************************************  This library is free software; you can redistribute it and/or*  modify it under the terms of the GNU Library General Public*  License as published by the Free Software Foundation; either*  version 2 of the License, or (at your option) any later version.**  This library is distributed in the hope that it will be useful,*  but WITHOUT ANY WARRANTY; without even the implied warranty of*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU*  Library General Public License for more details.**  You should have received a copy of the GNU Library General Public*  License along with this library; if not, write to the*  Free Software Foundation, Inc., 59 Temple Place - Suite 330,*  Boston, MA  02111-1307, USA.**  Based on EmbreoRun**  @author: Copyright (C) Tim Carver*********************************************************************/package org.emboss.jemboss.soap;import java.io.*;import java.util.*;import org.emboss.jemboss.JembossParams;/**** Executes an application on a server**/public class JembossRun{  /** status message */  private String statusmsg;  /** status of the request */  private String status;  /** program result */  private Hashtable proganswer;  /**  *  * @param appl       	defining command  * @param options    	defining options  * @param filesToMove  Hashtable of filenames and contents  * @param mysettings 	jemboss properties  * @throws JembossSoapException if authentication fails  *  */  public JembossRun(String appl, String options, Hashtable filesToMove,                     JembossParams mysettings) throws JembossSoapException   {    String fulloptions;    Vector params = new Vector();    params.addElement(appl);     //construct a full options string    fulloptions = "mode="+mysettings.getCurrentMode()+" "+options;//   if (mysettings.getUseX11()) //     fulloptions = "display="+mysettings.getX11display()+" "+fulloptions;    params.addElement(fulloptions);    // just pass the hash    params.addElement(filesToMove);    PrivateRequest eRun;    try     {      eRun = new PrivateRequest(mysettings,			       "run_prog", params);    }    catch (JembossSoapException e)    {      throw new JembossSoapException("Authentication Failed");    }    proganswer = eRun.getHash();    status = proganswer.get("status").toString();    statusmsg = proganswer.get("msg").toString();        proganswer.remove("status");  // delete the status/msg    proganswer.remove("msg");  }  /**  *  * The status of the request  * @return 	0 for success  *  */  public String getStatus()   {    return status;  }    /**  *  * A status message or description of a error  * @return 	status message  *  */  public String getStatusMsg()   {    return statusmsg;  }  /**  *  * Get a Hashtable of filenames and their contents generated by  * running the application  * @return 	results  *  */  public Hashtable hash()   {    return proganswer;  }  /**  *  * Get a result from the result Hashtable  * @param key	key into the results Hashtable  * @return 	element in the results Hashtable  *  */  public Object get(Object key)   {    return proganswer.get(key);  }}

⌨️ 快捷键说明

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