hudson.plugins.perforce
Class HudsonP4DefaultExecutor

java.lang.Object
  extended by hudson.plugins.perforce.HudsonP4DefaultExecutor
All Implemented Interfaces:
Executor, HudsonP4Executor

public class HudsonP4DefaultExecutor
extends Object
implements HudsonP4Executor

Implementation of the P4Java Executor interface that provides support for remotely executing Perforce commands.

User contract: Use this class only once to execute a command. ,to execute another command, spawn another Exector using the Exector Factory

Author:
Victor Szoltysek

Method Summary
 void close()
          Close down all open resources
 void exec(String[] cmd)
          Execute the specified command and its arguments
 InputStream getInputStream()
           
 OutputStream getOutputStream()
           
 BufferedReader getReader()
          Returns a BufferedReader for reading from the stdout/stderr of this process
 BufferedWriter getWriter()
          Returns a BufferedWriter for writing to the stdin of this process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public void close()
Description copied from interface: Executor
Close down all open resources

Specified by:
close in interface Executor
Specified by:
close in interface HudsonP4Executor

exec

public void exec(String[] cmd)
          throws PerforceException
Description copied from interface: Executor
Execute the specified command and its arguments

Specified by:
exec in interface Executor
Specified by:
exec in interface HudsonP4Executor
Throws:
PerforceException

getWriter

public BufferedWriter getWriter()
Description copied from interface: Executor
Returns a BufferedWriter for writing to the stdin of this process

Specified by:
getWriter in interface Executor
Returns:

getReader

public BufferedReader getReader()
Description copied from interface: Executor
Returns a BufferedReader for reading from the stdout/stderr of this process

Specified by:
getReader in interface Executor
Returns:

getInputStream

public InputStream getInputStream()
Specified by:
getInputStream in interface Executor
Specified by:
getInputStream in interface HudsonP4Executor

getOutputStream

public OutputStream getOutputStream()
Specified by:
getOutputStream in interface Executor
Specified by:
getOutputStream in interface HudsonP4Executor


Copyright © 2004-2013 Hudson. All Rights Reserved.