org/objectweb/proactive/core/process/ssh/SSHJVMProcess.java

00001 /* 
00002  * ################################################################
00003  * 
00004  * ProActive: The Java(TM) library for Parallel, Distributed, 
00005  *            Concurrent computing with Security and Mobility
00006  * 
00007  * Copyright (C) 1997-2007 INRIA/University of Nice-Sophia Antipolis
00008  * Contact: proactive@objectweb.org
00009  * 
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2.1 of the License, or any later version.
00014  *  
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  * 
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00023  * USA
00024  *  
00025  *  Initial developer(s):               The ProActive Team
00026  *                        http://www.inria.fr/oasis/ProActive/contacts.html
00027  *  Contributor(s): 
00028  * 
00029  * ################################################################
00030  */ 
00031 package org.objectweb.proactive.core.process.ssh;
00032 
00033 import org.objectweb.proactive.core.process.JVMProcess;
00034 import org.objectweb.proactive.core.process.JVMProcessImpl;
00035 import org.objectweb.proactive.core.util.RemoteProcessMessageLogger;
00036 
00037 
00061 public class SSHJVMProcess extends SSHProcess implements JVMProcess {
00062     protected JVMProcessImpl jvmProcess;
00063 
00064     //
00065     // -- CONSTRUCTORS -----------------------------------------------
00066     //
00067 
00072     public SSHJVMProcess() {
00073         super();
00074     }
00075 
00080     public SSHJVMProcess(RemoteProcessMessageLogger messageLogger) {
00081         this(messageLogger, messageLogger);
00082     }
00083 
00089     public SSHJVMProcess(RemoteProcessMessageLogger inputMessageLogger,
00090         RemoteProcessMessageLogger errorMessageLogger) {
00091         super(new JVMProcessImpl(inputMessageLogger, errorMessageLogger));
00092         jvmProcess = (JVMProcessImpl) targetProcess;
00093     }
00094 
00095     //
00096     // -- PUBLIC METHODS -----------------------------------------------
00097     //
00098     public static void main(String[] args) {
00099         try {
00100             SSHProcess rsh = new SSHJVMProcess(new StandardOutputMessageLogger());
00101             rsh.setHostname("solida");
00102             rsh.startProcess();
00103         } catch (Exception e) {
00104             e.printStackTrace();
00105         }
00106     }
00107 
00108     //
00109     // -- implements JVMProcess -----------------------------------------------
00110     //
00111 
00116     public String getClasspath() {
00117         return jvmProcess.getClasspath();
00118     }
00119 
00124     public void setClasspath(String classpath) {
00125         checkStarted();
00126         jvmProcess.setClasspath(classpath);
00127     }
00128 
00132     public String getBootClasspath() {
00133         checkStarted();
00134         return jvmProcess.getBootClasspath();
00135     }
00136 
00141     public void setBootClasspath(String bootClasspath) {
00142         checkStarted();
00143         jvmProcess.setBootClasspath(bootClasspath);
00144     }
00145 
00150     public String getJavaPath() {
00151         return jvmProcess.getJavaPath();
00152     }
00153 
00158     public void setJavaPath(String javaPath) {
00159         checkStarted();
00160         jvmProcess.setJavaPath(javaPath);
00161     }
00162 
00167     public String getPolicyFile() {
00168         return jvmProcess.getPolicyFile();
00169     }
00170 
00175     public void setPolicyFile(String policyFile) {
00176         checkStarted();
00177         jvmProcess.setPolicyFile(policyFile);
00178     }
00179 
00180     public String getLog4jFile() {
00181         return jvmProcess.getLog4jFile();
00182     }
00183 
00184     public void setLog4jFile(String log4jFile) {
00185         checkStarted();
00186         jvmProcess.setLog4jFile(log4jFile);
00187     }
00188 
00193     public String getClassname() {
00194         return jvmProcess.getClassname();
00195     }
00196 
00201     public void setClassname(String classname) {
00202         checkStarted();
00203         jvmProcess.setClassname(classname);
00204     }
00205 
00210     public String getParameters() {
00211         return jvmProcess.getParameters();
00212     }
00213 
00218     public void setParameters(String parameters) {
00219         checkStarted();
00220         jvmProcess.setParameters(parameters);
00221     }
00222 
00227     public void resetParameters() {
00228         jvmProcess.resetParameters();
00229     }
00230 
00235     public void setJvmOptions(String parameters) {
00236         jvmProcess.setJvmOptions(parameters);
00237     }
00238 
00239     public String getJvmOptions() {
00240         return jvmProcess.getJvmOptions();
00241     }
00242 
00243     public void setOverwrite(boolean overwrite) {
00244         jvmProcess.setOverwrite(overwrite);
00245     }
00246 
00247     public void setExtendedJVM(JVMProcessImpl jvmProcess) {
00248         jvmProcess.setExtendedJVM(jvmProcess);
00249     }
00250 
00251     public int getNewGroupId() {
00252         return jvmProcess.getNewGroupId();
00253     }
00254 
00255     //
00256     // -- PROTECTED METHODS -----------------------------------------------
00257     //
00258     //
00259     // -- PRIVATE METHODS -----------------------------------------------
00260     //
00261 }

Generated on Mon Jan 22 15:16:09 2007 for ProActive by  doxygen 1.5.1