Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  /*
   *  Copyright (C) 2010-2011 Oracle Corporation
   *
   *  This file is part of the VirtualBox SDK, as available from
   *  http://www.virtualbox.org.  This library is free software; you can
   *  redistribute it and/or modify it under the terms of the GNU Lesser General
   *  Public License as published by the Free Software Foundation, in version 2.1
   *  as it comes in the "COPYING.LIB" file of the VirtualBox SDK distribution.
  *  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 Lesser General Public
  *  License for more details.
  *
  * IProcess.java
  *
  * DO NOT EDIT! This is a generated file.
  * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
  * Generator: src/VBox/Main/glue/glue-java.xsl
  */
 
 package org.virtualbox_4_2;
 
 import javax.xml.ws.*;
 import java.util.List;

Abstract parent interface for processes handled by VirtualBox. Interface ID: {08864D56-96AB-418B-ADBC-5A679532AEB0}
 
 public class IProcess extends IUnknown {
 
     public IProcess(String wrappedVboxPortType port) {
           super(wrappedport);
     }
The process ID (PID).

Returns:
Long
 
     public Long getPID() {
       try {
          Long retVal = .iProcessGetPID();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
The current process status; see ProcessStatus for more information.

Returns:
org.virtualbox_4_2.ProcessStatus
 
       try {
          return org.virtualbox_4_2.ProcessStatus.fromValue(retVal.value());
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
The exit code. Only available when the process has been terminated normally.

Returns:
Integer
 
     public Integer getExitCode() {
       try {
          Integer retVal = .iProcessGetExitCode();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
The environment block this process is using during execution.

Returns:
List<String>
 
     public List<StringgetEnvironment() {
      try {
         List<StringretVal = .iProcessGetEnvironment();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The arguments this process is using for execution.

Returns:
List<String>
    public List<StringgetArguments() {
      try {
         List<StringretVal = .iProcessGetArguments();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Full path of the actual executable image.

Returns:
String
    public String getExecutablePath() {
      try {
         String retVal = .iProcessGetExecutablePath();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
The friendly name of this process.

Returns:
String
    public String getName() {
      try {
         String retVal = .iProcessGetName();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
    public static IProcess queryInterface(IUnknown obj) {
       return obj == null ?  null : new IProcess(obj.getWrapped(), obj.getRemoteWSPort());
    }
Waits for one more events to happen.

Parameters:
waitFor Specifies what to wait for; see ProcessWaitForFlag for more information.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
The overall wait result; see ProcessWaitResult for more information.
    public org.virtualbox_4_2.ProcessWaitResult waitFor(Long waitForLong timeoutMS) {
      try {
        org.virtualbox_4_2.jaxws.ProcessWaitResult     retVal;
        retVal = .iProcessWaitFor(waitFortimeoutMS);
        return org.virtualbox_4_2.ProcessWaitResult.fromValue(retVal.value());
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Waits for one more events to happen. Scriptable version of waitFor(java.lang.Long,java.lang.Long).

Parameters:
waitFor Specifies what to wait for; see ProcessWaitForFlag for more information.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
The overall wait result; see ProcessWaitResult for more information.
      try {
        org.virtualbox_4_2.jaxws.ProcessWaitResult     retVal;
        retVal = .iProcessWaitForArray(, Helper.convertEnums(org.virtualbox_4_2.ProcessWaitForFlag.class,org.virtualbox_4_2.jaxws.ProcessWaitForFlag.class,waitFor), timeoutMS);
        return org.virtualbox_4_2.ProcessWaitResult.fromValue(retVal.value());
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Reads data from a running process.

Parameters:
handle Handle to read from. Usually 0 is stdin.
toRead Number of bytes to read.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
Array of data read.
    public byte[] read(Long handleLong toReadLong timeoutMS) {
      try {
        /*base64*/String     retVal;
        retVal = .iProcessRead(handletoReadtimeoutMS);
        return Helper.decodeBase64(retVal);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Writes data to a running process.

Parameters:
handle Handle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.
flags A combination of ProcessInputFlag flags.
data Array of bytes to write. The size of the array also specifies how much to write.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
How much bytes were written.
    public Long write(Long handleLong flagsbyte[] dataLong timeoutMS) {
      try {
        Long     retVal;
        retVal = .iProcessWrite(handleflags, Helper.encodeBase64(data), timeoutMS);
        return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Writes data to a running process. Scriptable version of write(java.lang.Long,java.lang.Long,byte[],java.lang.Long).

Parameters:
handle Handle to write to. Usually 0 is stdin, 1 is stdout and 2 is stderr.
flags A combination of ProcessInputFlag flags.
data Array of bytes to write. The size of the array also specifies how much to write.
timeoutMS Timeout (in ms) to wait for the operation to complete. Pass 0 for an infinite timeout.
Returns:
How much bytes were written.
    public Long writeArray(Long handleList<org.virtualbox_4_2.ProcessInputFlagflagsbyte[] dataLong timeoutMS) {
      try {
        Long     retVal;
        retVal = .iProcessWriteArray(handle, Helper.convertEnums(org.virtualbox_4_2.ProcessInputFlag.class,org.virtualbox_4_2.jaxws.ProcessInputFlag.class,flags), Helper.encodeBase64(data), timeoutMS);
        return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Terminates (kills) a running process.
    public void terminate() {
      try {
        .iProcessTerminate();
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
New to GrepCode? Check out our FAQ X