Sonic ESB API

com.sonicsw.esb.mgmtapi.config
Interface IMonitoredContainerConfigAPI


public interface IMonitoredContainerConfigAPI


Method Summary
 void clearLogFiles(java.lang.String containerName)
          Clear the current log and archived rolling logs of the container.
 void deleteElement(java.lang.String configID)
          TODO: temporary, for debugging
 java.util.Set getAllMFContainers()
           
 java.util.List getAutoStartContainers()
          Return the list of monitored containers which will get checked for startup when the Workbench starts.
 java.lang.String getCachePassword(java.lang.String containerID)
          Return the cache password of the container, or null if it's not set
 java.util.Map getComponentMap(java.lang.String containerName, java.lang.String type)
          Get the components of the given type which are hosted in the container
 IConfigElement[] getComponents(java.lang.String containerName, java.lang.String type)
          Get the components of the given type which are hosted in the container
 java.lang.String getContainerCacheDirectory(java.lang.String containerID)
          Return the absolute value of the container cache directory.
 java.lang.String getContainerRuntimeID(java.lang.String containerConfigID)
          Return the runtime id of the container, in the form .
 java.lang.String getContainerWorkingDirectory(java.lang.String containerID)
          Get the working directory of the container from its configuration
 java.io.File getMFContainerLogFile(java.lang.String containerName)
          Return the java File object for the current log file for the container.
 java.util.Map getMonitoredMFContainerList()
          Get the list of monitored MF containers with their auto-launch settings
 java.io.File[] getRollingLogs(java.lang.String containerName)
          Get an array of all the rolling log files in the log file directory of the container.
 void removeMonitoredMFContainer(java.lang.String containerName)
          Remove the MF container from the monitored containers list
 void setMonitoredMFContainerAutoLaunch(java.lang.String containerName, boolean autoLaunch)
          Add the container to the list of monitored containers with the given auto-launch setting.
 void setWorkbenchRoot(java.lang.String root)
          Set the root of the Workbench workspace for the eclipse handler
 

Method Detail

getAutoStartContainers

java.util.List getAutoStartContainers()
Return the list of monitored containers which will get checked for startup when the Workbench starts.

Returns:
An List of com.sonicsw.esb.mgmtapi.conig.impl.MonitoredContainer. It will return an empty list if no auto-start monitored containers have been configured.

getMonitoredMFContainerList

java.util.Map getMonitoredMFContainerList()
Get the list of monitored MF containers with their auto-launch settings

Returns:
A Map of logical name/com.sonicsw.esb.mgmtapi.conig.impl.MonitoredContainer pairs

removeMonitoredMFContainer

void removeMonitoredMFContainer(java.lang.String containerName)
                                throws ESBAPIException
Remove the MF container from the monitored containers list

Parameters:
containerName - The logical configuration name of the container
Throws:
ESBAPIException - If there is a problem communicating with the directory service.

setMonitoredMFContainerAutoLaunch

void setMonitoredMFContainerAutoLaunch(java.lang.String containerName,
                                       boolean autoLaunch)
                                       throws ESBAPIException
Add the container to the list of monitored containers with the given auto-launch setting. If the container is already on the list, the flag gets reset.

Parameters:
containerName - The configuration name of the container
autoLaunch - true or false as desired.
Throws:
ESBAPIException - If there is a problem communicating with the domain for the configuration change.

getMFContainerLogFile

java.io.File getMFContainerLogFile(java.lang.String containerName)
Return the java File object for the current log file for the container. The log file directory of the container is computed as follows. If the LOG_FILE attribute is set on the configuration, that is used. If this value is a relative path, we use the WORKING_DIRECTORY of the container as the parent path. If the LOG_FILE is not set, the log file location is constructed from the WORKING_DIRECTORY and the subdirectory ..log. If the resulting path so far is a relative path, and the container is online, we get the container's current runtime log file property. If the container is not running, then, this method can return a file with a relative path that might not be found in the context of the callers running directory.

Parameters:
containerName - The configuration id of the container
Returns:
a File object for the container's log. If the computed log file directory of the container is not an absolute path, this method will return a File object with a relative path.

getRollingLogs

java.io.File[] getRollingLogs(java.lang.String containerName)
Get an array of all the rolling log files in the log file directory of the container. The log file directory of the container is computed as follows. If the LOG_FILE attribute is set on the configuration, that is used. If this value is a relative path, we use the WORKING_DIRECTORY of the container as the parent path. If the LOG_FILE is not set, the log file location is constructed from the WORKING_DIRECTORY and the subdirectory ..log. If the resulting path so far is a relative path, and the container is online, we get the container's current runtime log file property.

Parameters:
containerName - The logical ID of the MF container
Returns:
An array of all files in the log file directory of the container. If the computed log file directory of the container is not an absolute path, and the container is not running, the computed log file directory will be relative to the working directory of the caller, which is not likely to be where the logs are found. In this case, this method returns an array of size 0.

clearLogFiles

void clearLogFiles(java.lang.String containerName)
Clear the current log and archived rolling logs of the container. Invokes the Agent's runtime clearLogFile operation if the container is running, otherwise tries to find the log files on the caller's host using the configuration of the container and domain manager. The existing log files are deleted.

Parameters:
containerName - The logical name of the container, ie "/Containers/dev_ESBTest"

setWorkbenchRoot

void setWorkbenchRoot(java.lang.String root)
                      throws ESBAPIException
Set the root of the Workbench workspace for the eclipse handler

Parameters:
root - The root of the workspace opened in the Workbench
Throws:
ESBAPIException - if there's a problem making the change in the directory service

getComponents

IConfigElement[] getComponents(java.lang.String containerName,
                               java.lang.String type)
                               throws ESBAPIException
Get the components of the given type which are hosted in the container

Parameters:
containerName - The logical ID of the MF container to get components from.
type - The type of the components to be returned, for instance XQ_CONTAINER
Returns:
An array of components of the given container with the given type. Returns an empty array if there are no components of the requested type.
Throws:
ESBAPIException - if the container doesn't exist or if there's a problem communicating with the directory service

getComponentMap

java.util.Map getComponentMap(java.lang.String containerName,
                              java.lang.String type)
                              throws ESBAPIException
Get the components of the given type which are hosted in the container

Parameters:
containerName - The logical ID of the MF container to get components from.
type - The type of the components to be returned, for instance XQ_CONTAINER
Returns:
A map of component name/component configuration of components of the given container with the given type. Returns an empty map if there are no components of the requested type.
Throws:
ESBAPIException - if the container doesn't exist or if there's a problem communicating with the directory service

getContainerRuntimeID

java.lang.String getContainerRuntimeID(java.lang.String containerConfigID)
                                       throws ESBAPIException
Return the runtime id of the container, in the form . ie. Domain1.DomainManager

Parameters:
containerConfigID - The configuration name of the container, ie. "/Containers/DomainManager"
Returns:
The runtime id of the container in the connected domain
Throws:
ESBAPIException

getContainerWorkingDirectory

java.lang.String getContainerWorkingDirectory(java.lang.String containerID)
                                              throws ESBAPIException
Get the working directory of the container from its configuration

Parameters:
containerID - The logical configuration name of the container, ie. /Containers/Container1
Returns:
The container working directory setting in the directory service, null if it's not set
Throws:
ESBAPIException - if the container does not exist or there's a problem getting to the container configuration in the directory service

getAllMFContainers

java.util.Set getAllMFContainers()
Returns:
Return an array with the logical names of elements of type MF_CONTAINER from the logical namespace of the DS

getContainerCacheDirectory

java.lang.String getContainerCacheDirectory(java.lang.String containerID)
                                            throws ESBAPIException
Return the absolute value of the container cache directory. If the attribute value is relative, it is calculated using the container's working directory

Parameters:
containerID - The logical container ID
Returns:
The container's cache directory
Throws:
ESBAPIException - If the container does not exist or there is a problem communicating with the directory service.

getCachePassword

java.lang.String getCachePassword(java.lang.String containerID)
                                  throws ESBAPIException
Return the cache password of the container, or null if it's not set

Parameters:
containerID - the logical configuration id of the container
Returns:
The cache password, or null if it's not set
Throws:
ESBAPIException - if the container does not exist or there is a problem communicating with the directory service

deleteElement

void deleteElement(java.lang.String configID)
                   throws java.lang.Exception
TODO: temporary, for debugging

Throws:
java.lang.Exception

Sonic ESB API

Copyright © 2001-2012 Progress Software Corporation. All Rights Reserved.
HTML formatted on 13-Mar-2012.