com.ibm.websphere.ant.tasks
Class StopServer

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--com.ibm.websphere.ant.tasks.ServerControl
                    |
                    +--com.ibm.websphere.ant.tasks.StopServer

public class StopServer
extends ServerControl

The wsStopServer task enables you to stop a standalone server instance. This is not used to stop a server controlled by DeploymentManager. Therefore, this task is useful for the Base Application Server, and to stop the Node Agent and/or DeploymentManager. If you wish to stop a server managed by the Deployment Manager, use the wsadmin task to execute a scripting command. The structure of the wsStopServer task is shown below:

<wsStopServer server="name of the server to stop" noWait="true | <b>false</b>" quiet="true | <b>false</b>" logFile="name of the file to log to" replaceLog="true | <b>false</b>" trace="true | <b>false</b>" timeout="amount of time to wait for the server to stop" statusPort="port for the server to send status messages to" conntype="SOAP | RMI" host="hostname of the machine running the server you wish to stop" port="admin port of the server you wish to stop" username="name of the admin userid id to authenticate with" password="password of the admin user to authenticate with" wasHome="WebSphere Installation directory" failonerror="true | <b>false</b>"/> The server attribute is required and contains the name of the server you wish to stop
The noWait attribute is optional. If true, the task with return immediately without waiting for the server to stop.
The quiet attribute is optional. If true, the task will not print any status information.
The logFile attribute is optional and specifies the name of the file to log the server start information to.
The replaceLog attribute is optional. If true, the task with erase an existing log file, instead of appending.
The trace attribute is optional. If true, the task with print trace information.
The timeout attribute is optional and specified the amount of time to wait for the server to successfully stop.
The statusPort attribute is optional and specifies the TCP Port the server should send status messages to.
The conntype attribute is optional and specifies the admin transport type to connect to the server with.
The username attribute is optional and specifies the id of the admin user to authenticate with for administrative access.
The password attrubute is optional and specifies the password of the admin user to authenticate with for administrative access
The wasHome attribute is optional and it specifies the WebSphere installation directory
The failonerror attribute is optional and if set to true causes the build to stop if the task has an error

To use this task, add the following to your Ant build.xml <taskdef name="wsStopServer" classname="com.ibm.websphere.ant.tasks.StopServer"/>


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
StopServer()
           
 
Method Summary
 void addAdditionalArgs(java.util.ArrayList args)
           
 void addJvmArgs(org.apache.tools.ant.taskdefs.Java jvm)
           
 java.lang.String getMainClass()
           
 java.lang.String getTaskName()
           
 void setConntype(java.lang.String conntype)
          Sets the conntype.
 void setHost(java.lang.String host)
          Sets the host.
 void setPort(java.lang.String port)
          Sets the port.
 
Methods inherited from class com.ibm.websphere.ant.tasks.ServerControl
execute, runScript, setFailonerror, setLogFile, setNoWait, setPassword, setQuiet, setReplaceLog, setServer, setStatusPort, setTimeout, setTrace, setUsername, setWasHome
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopServer

public StopServer()
Method Detail

getMainClass

public java.lang.String getMainClass()
Specified by:
getMainClass in class ServerControl
See Also:
ServerControl.getMainClass()

addAdditionalArgs

public void addAdditionalArgs(java.util.ArrayList args)
Specified by:
addAdditionalArgs in class ServerControl
See Also:
ServerControl.addAdditionalArgs(ArrayList)

addJvmArgs

public void addJvmArgs(org.apache.tools.ant.taskdefs.Java jvm)
Specified by:
addJvmArgs in class ServerControl
See Also:
ServerControl.addJvmArgs(Java)

getTaskName

public java.lang.String getTaskName()
Specified by:
getTaskName in class ServerControl
See Also:
Task#getTaskName()

setConntype

public void setConntype(java.lang.String conntype)
Sets the conntype.

Parameters:
conntype - The conntype to set

setHost

public void setHost(java.lang.String host)
Sets the host.

Parameters:
host - The host to set

setPort

public void setPort(java.lang.String port)
Sets the port.

Parameters:
port - The port to set


 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.