com.ibm.websphere.ant.tasks

Class StopServer

  1. java.lang.Object
  2. extended byTask
  3. extended bycom.ibm.websphere.ant.tasks.ServerControl
  4. extended bycom.ibm.websphere.ant.tasks.StopServer

  1. public class StopServer
  2. 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" profilename="the profile name of the desired server" nowait="true | false" quiet="true | false" logfile="name of the file to log to" replacelog="true | false" trace="true | false" timeout="amount of time to wait for the server to stop" statusport="port for the server to send status messages to" conntype="SOAP | RMI" 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 | false" fileencoding="UTF8"/> The server attribute is required and contains the name of the server you wish to stop
The profileName attribute is optional and it contains the name of the server profile to be used
The noWait attribute is optional. If true, the task with return immediately without waiting for the server to stop (default is false).
The quiet attribute is optional. If true, the task will not print any status information (default is false).
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 (default is false).
The trace attribute is optional. If true, the task with print trace information (default is false).
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 (default is false).
The fileEncoding attribute is optional and sets the file.encoding System Property for the underlying VM.

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

Constructor Summary

Constructor and Description
StopServer()

Method Summary

Modifier and Type Method and Description
  1. void
addAdditionalArgs(java.util.ArrayList<java.lang.String> args)
  1. void
addJvmArgs(Java jvm)
  1. java.lang.String
getMainClass()
  1. java.lang.String
getTaskName()
  1. void
setConntype(java.lang.String conntype)
Sets the conntype.
  1. void
setPort(java.lang.String port)
Sets the port.
Methods inherited from class com.ibm.websphere.ant.tasks.ServerControl
execute, isDebug, runScript, setDebug, setFailonerror, setFileEncoding, setJvmMaxMemory, setLogFile, setNoWait, setPassword, setProfileName, setQuiet, setReplaceLog, setServer, setStatusPort, setTimeout, setTrace, setUsername, setWasHome
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StopServer

  1. public StopServer()

Method Detail

getMainClass

  1. public java.lang.String getMainClass( )
Specified by:
See Also:

addAdditionalArgs

  1. public void addAdditionalArgs(java.util.ArrayList<java.lang.String> args)
Specified by:
See Also:

addJvmArgs

  1. public void addJvmArgs(Java jvm)
Specified by:
See Also:

getTaskName

  1. public java.lang.String getTaskName( )
Specified by:
See Also:
Task#getTaskName()

setConntype

  1. public void setConntype(java.lang.String conntype)
Sets the conntype.
Parameters:
conntype - The conntype to set

setPort

  1. public void setPort(java.lang.String port)
Sets the port.
Parameters:
port - The port to set