In this section: |
This section provides examples that can only be executed as a Task because they require parameters to be set. Executing them in the file browser will result in an error appearing in the activity feed.
Note: All variables underlined must be defined when creating a Task.
The following example sets the number of worker threads for a channel to 2.
$(".channel").property(serverName, applicationName, channelName, "config.count", "2");
The following example sets the JVM options for a server.
$(".server").property(serverName, "config.JVM_OPTION", "-Xmx=512");
The following example deploys a package to a server. You must create a package from SPOG prior to deploying in a script. You cannot create a package in a script.
$(".package").deploy(serverName, packageArtifactName);
The following example undeploys a package.
$(".package").undeploy(serverName, packageArtifactName);
The following example deploys an application. An example of portNumber could be 10003.
$(".application").deploy(serverName, applicationName, iiaArtifactName, portNumber, // integer templateArtifactName, description, overwrite // boolean );
The following example undeploys an application.
$(".application").undeploy(serverName, applicationName)
The following example starts an application.
$(".application").start(serverName, applicationName);
The following example stops an application.
$(".application").stop(serverName, applicationName);
The following example retrieves all the channels from an application and starts the channel matching the channelName.
var channels = $(".application").channels(serverName, applicationName); for(i in channels) { if(channels[i].name == channelName) { $(".channel").start(channels[i].id); break; } }
The following example retrieves all the channels from an application and stops the channel matching the channelName.
var channels = $(".application").channels(serverName, applicationName); for(i in channels) { if(channels[i].name == channelName) { $(".channel").stop(channels[i].id); break; } }
iWay Software |