org.jvnet.hudson.test
Class PretendSlave

java.lang.Object
  extended by hudson.model.AbstractModelObject
      extended by hudson.model.Node
          extended by hudson.model.Slave
              extended by org.jvnet.hudson.test.PretendSlave
All Implemented Interfaces:
ExtensionPoint, Describable<Node>, ModelObject, ReconfigurableDescribable<Node>, SearchableModelObject, SearchItem, AccessControlled, Serializable, OnMaster

public class PretendSlave
extends Slave

Slave that pretends to fork processes.

Author:
Kohsuke Kawaguchi
See Also:
HudsonTestCase.createPretendSlave(FakeLauncher), Serialized Form

Nested Class Summary
static class PretendSlave.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.model.Slave
Slave.JnlpJar, Slave.SlaveDescriptor
 
Nested classes/interfaces inherited from class hudson.model.Node
Node.InternalComputerListener, Node.Mode
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 int numLaunch
          Number of processed that are launched.
 
Fields inherited from class hudson.model.Slave
name, remoteFS
 
Fields inherited from class hudson.model.Node
holdOffLaunchUntilSave
 
Constructor Summary
PretendSlave(String name, String remoteFS, int numExecutors, Node.Mode mode, String labelString, ComputerLauncher launcher, FakeLauncher faker)
           
PretendSlave(String name, String remoteFS, String labelString, ComputerLauncher launcher, FakeLauncher faker)
           
 
Method Summary
 Launcher createLauncher(TaskListener listener)
          Returns a Launcher for executing programs on this node.
 
Methods inherited from class hudson.model.Slave
createComputer, equals, getClockDifference, getComputer, getDescriptor, getLabelString, getLauncher, getMode, getNodeDescription, getNodeName, getNodeProperties, getNumExecutors, getRemoteFS, getRetentionStrategy, getRootPath, getUserId, getWorkspaceFor, getWorkspaceRoot, hashCode, readResolve, setLabelString, setLauncher, setMode, setNodeName, setRetentionStrategy, setUserId
 
Methods inherited from class hudson.model.Node
canTake, canTake, checkPermission, createPath, getACL, getAssignedLabels, getChannel, getDisplayName, getFileSystemProvisioner, getLabelCloud, getNodePropertyDescriptors, getSearchUrl, getSelfLabel, hasPermission, isHoldOffLaunchUntilSave, reconfigure, toComputer
 
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numLaunch

public int numLaunch
Number of processed that are launched.

Constructor Detail

PretendSlave

public PretendSlave(String name,
                    String remoteFS,
                    int numExecutors,
                    Node.Mode mode,
                    String labelString,
                    ComputerLauncher launcher,
                    FakeLauncher faker)
             throws IOException,
                    Descriptor.FormException
Throws:
IOException
Descriptor.FormException

PretendSlave

public PretendSlave(String name,
                    String remoteFS,
                    String labelString,
                    ComputerLauncher launcher,
                    FakeLauncher faker)
             throws IOException,
                    Descriptor.FormException
Throws:
IOException
Descriptor.FormException
Method Detail

createLauncher

public Launcher createLauncher(TaskListener listener)
Description copied from class: Node
Returns a Launcher for executing programs on this node.

The callee must call Launcher.decorateFor(Node) before returning to complete the decoration.

Overrides:
createLauncher in class Slave


Copyright © 2004-2013. All Rights Reserved.