|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.mmconsole.extension.er.BaseExtensionPointImpl
com.ibm.mmconsole.extension.er.ExecuteTaskImpl
public class ExecuteTaskImpl
This is the execute task extension point for Express Runtime.
IExecuteTask.
| Field Summary | |
|---|---|
static java.lang.String |
IRU_CERT_ERROR
|
static java.lang.String |
NO_FILES_TO_SEND_ERROR
|
| Fields inherited from interface com.ibm.mmconsole.extension.IExecuteTask |
|---|
STARTED, STOPPED, UNAVAILABLE, UNKNOWN |
| Constructor Summary | |
|---|---|
ExecuteTaskImpl()
Default constructor |
|
ExecuteTaskImpl(java.util.Locale userLocale)
A constructor that takes a Locale object. |
|
| Method Summary | |
|---|---|
void |
addDirectoryToSend(java.io.File directory,
java.lang.String directoryToPerverse)
This method allows you to specify a directory to send to the console agent. |
void |
addFileToSend(java.io.File file,
java.lang.String directoryToPerverse)
This method allows you to specify an individual file to send to the console agent. |
void |
destroy()
Clean up objects |
java.lang.String |
getAntTaskResult()
Returns the result of the Ant task. |
java.lang.String |
getErrorMessage()
Returns the error message that occurred during execution. |
int |
getResourceStatus(javax.portlet.PortletRequest request,
Resource resource,
IConsoleConfiguration consoleConfiguration)
This method will retrieve the status of the specified resource. |
boolean |
isThereAFileNotFoundError()
This method indicates if there was a file not found error when executing a task in which an ANT or a Jython file was specified. |
boolean |
isThereAuthenticationError()
This method indicates if the was an authentication error during a task execution. |
boolean |
launchAntTask(java.lang.String filename,
java.lang.String targetName,
java.util.Properties properties,
Resource resource,
javax.portlet.PortletRequest request,
IConsoleConfiguration consoleConfiguration,
boolean encodeResourceProperties)
This methods allows you to run an Ant task. |
boolean |
runWsAdminJythonScript(javax.portlet.PortletRequest request,
ApplicationServerResource resource,
java.lang.String wasJythonFile,
IConsoleConfiguration consoleConfiguration)
This method enables you to run a Jython script against a specified application server object. |
boolean |
sendFilesToAgent(Resource resource,
javax.portlet.PortletRequest request,
IConsoleConfiguration consoleConfiguration)
This method allows you to send files to the console agent. |
boolean |
startResource(javax.portlet.PortletRequest request,
Resource resource,
IConsoleConfiguration consoleConfiguration)
This method attempts to start the specified resource. |
boolean |
stopResource(javax.portlet.PortletRequest request,
Resource resource,
IConsoleConfiguration consoleConfiguration)
This method attempts to stop the specified resource. |
| Methods inherited from class com.ibm.mmconsole.extension.er.BaseExtensionPointImpl |
|---|
getUserLocale, setUserLocale |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.mmconsole.extension.IBaseExtensionPoint |
|---|
getUserLocale, setUserLocale |
| Field Detail |
|---|
public static final java.lang.String NO_FILES_TO_SEND_ERROR
public static final java.lang.String IRU_CERT_ERROR
| Constructor Detail |
|---|
public ExecuteTaskImpl()
public ExecuteTaskImpl(java.util.Locale userLocale)
userLocale - - - The Locale object representing the user's locale (which is also known as the browser's locale).| Method Detail |
|---|
public java.lang.String getAntTaskResult()
getAntTaskResult in interface IExecuteTaskpublic java.lang.String getErrorMessage()
getErrorMessage in interface IExecuteTaskpublic void destroy()
destroy in interface IBaseExtensionPointdestroy in class BaseExtensionPointImpl
public int getResourceStatus(javax.portlet.PortletRequest request,
Resource resource,
IConsoleConfiguration consoleConfiguration)
getResourceStatus in interface IExecuteTaskrequest - - An instance of PortletRequest.resource - - An instance of Resource.consoleConfiguration - - An instance of the IConsoleConfiguration
IExecuteTask.STARTED, IExecuteTask.STOPPED, IExecuteTask.UNAVAILABLE, IExecuteTask.UNKNOWN
public boolean startResource(javax.portlet.PortletRequest request,
Resource resource,
IConsoleConfiguration consoleConfiguration)
startResource in interface IExecuteTaskrequest - - An instance of PortletRequest.resource - - An instance of Resource.consoleConfiguration - - An instance of the IConsoleConfiguration
public boolean stopResource(javax.portlet.PortletRequest request,
Resource resource,
IConsoleConfiguration consoleConfiguration)
stopResource in interface IExecuteTaskrequest - - An instance of PortletRequest.resource - - An instance of Resource.consoleConfiguration - - An instance of the IConsoleConfiguration
public boolean runWsAdminJythonScript(javax.portlet.PortletRequest request,
ApplicationServerResource resource,
java.lang.String wasJythonFile,
IConsoleConfiguration consoleConfiguration)
runWsAdminJythonScript in interface IExecuteTaskrequest - - An instance of PortletRequest.resource - - An instance of ApplicationServerResource.wasJythonFile - - The name of the Jython script to execute. The name
specified must be relative to console agent's scripts directory.
For example: If you have ConsoleAgentInstall/scripts/MyBusApp/jyhton1.py
then the name is MyBusApp/jyhton1.py.consoleConfiguration - - An instance of the IConsoleConfiguration
public boolean launchAntTask(java.lang.String filename,
java.lang.String targetName,
java.util.Properties properties,
Resource resource,
javax.portlet.PortletRequest request,
IConsoleConfiguration consoleConfiguration,
boolean encodeResourceProperties)
launchAntTask in interface IExecuteTaskfilename - - The name of the Ant file to run. The name specified must be relative to console agent's scripts directory.
For example: If the file location is ConsoleAgentInstall/scripts/MyBusApp/ant1.xml
then the name is MyBusApp/znt1.xml.targetName - - The name of the target within the Ant file to run.properties - - A Properties object representing any properties to pass on to the Ant script.
This can be null if there are no properties to pass on.resource - - An instance of Resource.request - - An instance of PortletRequest.consoleConfiguration - - An instance of the IConsoleConfigurationencodeResourceProperties - - A boolean indicating that you want to add the Express Runtime Ant properties for the given resource.
This is useful in case your Ant scripts are referencing the existing Express Runtime Ant scripts.
public void addDirectoryToSend(java.io.File directory,
java.lang.String directoryToPerverse)
addDirectoryToSend in interface IExecuteTaskdirectory - - A File that represents the directory to send. It send everything in the directory.directoryToPerverse - - This would be the directory in which you would like to
preserve the path data. For example: You would specify "MyBusApp"
if you specifed the directory c:\temp\MyBusApp and wanted to retain
"MyBusApp" in path on the console agent machine.
public void addFileToSend(java.io.File file,
java.lang.String directoryToPerverse)
addFileToSend in interface IExecuteTaskdirectory - - A File that represents the file to send.directoryToPerverse - - This would be the directory in which you would like to
preserve the path data. For example: You would specify "MyBusApp"
if you specifed the file c:\temp\MyBusApp\ant1.xml and wanted to retain
"MyBusApp" in path on the console agent machine.
public boolean sendFilesToAgent(Resource resource,
javax.portlet.PortletRequest request,
IConsoleConfiguration consoleConfiguration)
IExecuteTask.isThereAFileNotFoundError().
The files should be located somewhere on the console machine. To specify which files to use, see
IExecuteTask.addDirectoryToSend(File, String) or IExecuteTask.addFileToSend(File, String).
The files are copied over into the console agent's scripts folder.
sendFilesToAgent in interface IExecuteTaskresource - - An instance of Resource.request - - An instance of PortletRequest.consoleConfiguration - - An instance of the IConsoleConfiguration
public boolean isThereAuthenticationError()
isThereAuthenticationError in interface IExecuteTaskpublic boolean isThereAFileNotFoundError()
isThereAFileNotFoundError in interface IExecuteTask
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||