com.ibm.di.api.jmx.mbeans
Class SystemLog

java.lang.Object
  extended by com.ibm.di.api.jmx.mbeans.BaseAdmin
      extended by com.ibm.di.api.jmx.mbeans.SystemLog
All Implemented Interfaces:
BaseAdminMBean, BaseMBean, SystemLogMBean

public class SystemLog
extends BaseAdmin
implements SystemLogMBean


Field Summary
static String MBEAN_ID
           
static String MBEAN_TYPE
           
 
Constructor Summary
SystemLog(SystemLog aSystemLog)
           
 
Method Summary
 void cleanAllOldALLogs(Date aMinDate)
          Deletes all AssemblyLines' log files older than the specified date.
 void cleanAllOldALLogs(Integer aKeepNum)
          Deletes all AssemblyLines' log files except those generated on the "aKeepNum" latest runs of all AssemblyLines.
 void cleanAllOldEHLogs(Date aMinDate)
          Deletes all EventHandlers' log files older than the specified date.
 void cleanAllOldEHLogs(Integer aKeepNum)
          Deletes all EventHandlers' log files except those generated on the "aKeepNum" latest runs of all EventHandlers.
 void cleanAllOldLogs(Date aMinDate)
          Deletes all log files older than the specified date.
 void cleanAllOldLogs(Integer aKeepNum)
          Deletes all log files except those generated on the "aKeepNum" latest runs of all components.
 Boolean cleanOldALLogs(String aConfigId, String aALName, Date aMinDate)
          Deletes those log files of the specified AssemblyLine, that are older than the specified date.
 Boolean cleanOldALLogs(String aConfigId, String aALName, Integer aKeepNum)
          Deletes all log files of the specified AssemblyLine except those generated on the "aKeepNum" latest AssemblyLine runs.
 Boolean cleanOldEHLogs(String aConfigId, String aEHName, Date aMinDate)
          Deletes those log files of the specified EventHandler, that are older than the specified date.
 Boolean cleanOldEHLogs(String aConfigId, String aEHName, Integer aKeepNum)
          Deletes all log files of the specified EventHandler except those generated on the "aKeepNum" latest EventHandler runs.
 String getALLastLogFileName(String aConfigId, String aALName)
          Returns the name of the log file created on the last run of a given AssemblyLine.
 String getALLog(String aConfigId, String aALName, String aLogFileName)
          Given an AssemblyLine identification, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.
 String[] getALLogFileNames(String aConfigId, String aALName)
          Returns the names of all available log files for a given AssemblyLine.
 String getALLogLastChunk(String aConfigId, String aALName, String aLogFileName, Integer aKilobytes)
          Retrieves the last chunk from a specified AssemblyLine's log file.
 String getEHLastLogFileName(String aConfigId, String aEHName)
          Returns the name of the log file created on the last run of a given EventHandler.
 String getEHLog(String aConfigId, String aEHName, String aLogFileName)
          Given an EventHandler identification, and a log file name, retrieves the log of this EventHandler, stored in the specified file.
 String[] getEHLogFileNames(String aConfigId, String aEHName)
          Rreturns the names of all available log files for a given EventHandler.
 String getEHLogLastChunk(String aConfigId, String aEHName, String aLogFileName, Integer aKilobytes)
          Retrieves the last chunk from a specified EventHandler's log file.
 String getId()
          Reads attribute "Id".
 String getType()
          Reads attribute "Type".
 
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_TYPE

public static final String MBEAN_TYPE
See Also:
Constant Field Values

MBEAN_ID

public static final String MBEAN_ID
See Also:
Constant Field Values
Constructor Detail

SystemLog

public SystemLog(SystemLog aSystemLog)
Method Detail

getType

public String getType()
Description copied from interface: BaseMBean
Reads attribute "Type".

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getType in interface BaseMBean
Returns:
the type of this MBean.

getId

public String getId()
Description copied from interface: BaseMBean
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.

getType() and getId() are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as "type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".

Specified by:
getId in interface BaseMBean
Returns:
the Id of this MBean.

getALLogFileNames

public String[] getALLogFileNames(String aConfigId,
                                  String aALName)
                           throws DIException
Description copied from interface: SystemLogMBean
Returns the names of all available log files for a given AssemblyLine.

Specified by:
getALLogFileNames in interface SystemLogMBean
Parameters:
aConfigId - identification of the AssemblyLine's Config Instance.
aALName - the name of the AssemblyLine.
Returns:
a String array, each of its elements specifying the name of a log file.
Throws:
DIException - if an error occurs while obtaining AssemblyLine's log file names.

getALLastLogFileName

public String getALLastLogFileName(String aConfigId,
                                   String aALName)
                            throws DIException
Description copied from interface: SystemLogMBean
Returns the name of the log file created on the last run of a given AssemblyLine.

Specified by:
getALLastLogFileName in interface SystemLogMBean
Parameters:
aConfigId - identification of the AssemblyLine's Config Instance.
aALName - the name of the AssemblyLine.
Returns:
the name of the log file created on the last AssemblyLine's run.
Throws:
DIException - if an error occurs while obtaining the log file name.

getALLog

public String getALLog(String aConfigId,
                       String aALName,
                       String aLogFileName)
                throws DIException
Description copied from interface: SystemLogMBean
Given an AssemblyLine identification, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.

Specified by:
getALLog in interface SystemLogMBean
Parameters:
aConfigId - identification of the AssemblyLine's Config Instance.
aALName - the name of the AssemblyLine.
aLogFileName - the name of the log file; no file path should be specified - just the file name.
Returns:
the sepcified log of the AssemblyLine.
Throws:
DIException - if an error occurs while obtaining AssemblyLine's log.

getALLogLastChunk

public String getALLogLastChunk(String aConfigId,
                                String aALName,
                                String aLogFileName,
                                Integer aKilobytes)
                         throws DIException
Description copied from interface: SystemLogMBean
Retrieves the last chunk from a specified AssemblyLine's log file.

Specified by:
getALLogLastChunk in interface SystemLogMBean
Parameters:
aConfigId - identification of the AssemblyLine's Config Instance.
aALName - the name of the AssemblyLine.
aLogFileName - the name of the log file; no file path should be specified - just the file name.
aKilobytes - specifies in kilobytes the size of the log's last chunk that will be read.
Returns:
the last chunk of the specified AssemblyLine's log.
Throws:
DIException - if an error occurs while obtaining AssemblyLine's log.

getEHLogFileNames

public String[] getEHLogFileNames(String aConfigId,
                                  String aEHName)
                           throws DIException
Description copied from interface: SystemLogMBean
Rreturns the names of all available log files for a given EventHandler.

Specified by:
getEHLogFileNames in interface SystemLogMBean
Parameters:
aConfigId - identification of the EventHandelr's Config Instance.
aEHName - the name of the EventHandler.
Returns:
a String array, each of its elements specifying the name of a log file.
Throws:
DIException - if an error occurs while obtaining EventHandler's log file names.

getEHLastLogFileName

public String getEHLastLogFileName(String aConfigId,
                                   String aEHName)
                            throws DIException
Description copied from interface: SystemLogMBean
Returns the name of the log file created on the last run of a given EventHandler.

Specified by:
getEHLastLogFileName in interface SystemLogMBean
Parameters:
aConfigId - identification of the EventHandelr's Config Instance.
aEHName - the name of the EventHandler.
Returns:
the name of the log file created on the last EventHandler's run.
Throws:
DIException - if an error occurs while obtaining the log file name.

getEHLog

public String getEHLog(String aConfigId,
                       String aEHName,
                       String aLogFileName)
                throws DIException
Description copied from interface: SystemLogMBean
Given an EventHandler identification, and a log file name, retrieves the log of this EventHandler, stored in the specified file.

Specified by:
getEHLog in interface SystemLogMBean
Parameters:
aConfigId - identification of the EventHandelr's Config Instance.
aEHName - the name of the EventHandler.
aLogFileName - the name of the log file; no file path should be specified - just the file name.
Returns:
the specified log of the EventHandler.
Throws:
DIException - if an error occurs while obtaining EventHandler's log.

getEHLogLastChunk

public String getEHLogLastChunk(String aConfigId,
                                String aEHName,
                                String aLogFileName,
                                Integer aKilobytes)
                         throws DIException
Description copied from interface: SystemLogMBean
Retrieves the last chunk from a specified EventHandler's log file.

Specified by:
getEHLogLastChunk in interface SystemLogMBean
Parameters:
aConfigId - identification of the EventHandelr's Config Instance.
aEHName - the name of the EventHandler.
aLogFileName - the name of the log file; no file path should be specified - just the file name.
aKilobytes - specifies in kilobytes the size of the log's last chunk that will be read.
Returns:
the last chunk of the specified EventHandler's log.
Throws:
DIException - if an error occurs while obtaining EventHandler's log.

cleanAllOldLogs

public void cleanAllOldLogs(Date aMinDate)
                     throws DIException
Description copied from interface: SystemLogMBean
Deletes all log files older than the specified date.

Specified by:
cleanAllOldLogs in interface SystemLogMBean
Parameters:
aMinDate - only log files that were last modified before this date will be deleted.
Throws:
DIException - if an error occurs while deleting log files.

cleanAllOldLogs

public void cleanAllOldLogs(Integer aKeepNum)
                     throws DIException
Description copied from interface: SystemLogMBean
Deletes all log files except those generated on the "aKeepNum" latest runs of all components.

Specified by:
cleanAllOldLogs in interface SystemLogMBean
Parameters:
aKeepNum - specifies the number of the latest log files that should not be deleted; If for example, aKeepNum == 5, for each component only the 5 latest log files will not be deleted.
Throws:
DIException - if an error occurs while deleting log files.

cleanAllOldALLogs

public void cleanAllOldALLogs(Date aMinDate)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes all AssemblyLines' log files older than the specified date.

Specified by:
cleanAllOldALLogs in interface SystemLogMBean
Parameters:
aMinDate - only log files that were last modified before this date will be deleted.
Throws:
DIException - if an error occurs while deleting log files.

cleanAllOldALLogs

public void cleanAllOldALLogs(Integer aKeepNum)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes all AssemblyLines' log files except those generated on the "aKeepNum" latest runs of all AssemblyLines.

Specified by:
cleanAllOldALLogs in interface SystemLogMBean
Parameters:
aKeepNum - specifies the number of the latest log files that should not be deleted; If for example, aKeepNum == 5, for each AssemblyLine only the 5 latest log files will not be deleted.
Throws:
DIException - if an error occurs while deleting log files.

cleanAllOldEHLogs

public void cleanAllOldEHLogs(Date aMinDate)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes all EventHandlers' log files older than the specified date.

Specified by:
cleanAllOldEHLogs in interface SystemLogMBean
Parameters:
aMinDate - only log files that were last modified before this date will be deleted.
Throws:
DIException - if an error occurs while deleting log files.

cleanAllOldEHLogs

public void cleanAllOldEHLogs(Integer aKeepNum)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes all EventHandlers' log files except those generated on the "aKeepNum" latest runs of all EventHandlers.

Specified by:
cleanAllOldEHLogs in interface SystemLogMBean
Parameters:
aKeepNum - specifies the number of the latest log files that should not be deleted; If for example, aKeepNum == 5, for each EventHandler only the 5 latest log files will not be deleted.
Throws:
DIException - if an error occurs while deleting log files.

cleanOldALLogs

public Boolean cleanOldALLogs(String aConfigId,
                              String aALName,
                              Date aMinDate)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes those log files of the specified AssemblyLine, that are older than the specified date.

Specified by:
cleanOldALLogs in interface SystemLogMBean
Parameters:
aConfigId - identification of the AssemblyLine's Config Instance.
aALName - the name of the AssemblyLine whose logs will be cleaned up.
aMinDate - only log files that were last modified before this date will be deleted.
Returns:
a Boolean that holds true if the log files were deleted successfully; and null if there is no log folder for the specified AssemblyLine.
Throws:
DIException - if an error occurs while deleting log files.

cleanOldALLogs

public Boolean cleanOldALLogs(String aConfigId,
                              String aALName,
                              Integer aKeepNum)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes all log files of the specified AssemblyLine except those generated on the "aKeepNum" latest AssemblyLine runs.

Specified by:
cleanOldALLogs in interface SystemLogMBean
Parameters:
aConfigId - identification of the AssemblyLine's Config Instance.
aALName - the name of the AssemblyLine whose logs will be cleaned up.
aKeepNum - specifies the number of the latest log files that should not be deleted; If for example, aKeepNum == 5 only the 5 latest AssemblyLine's log files will not be deleted.
Returns:
a Boolean that holds true if the log files were deleted successfully; and null if there is no log folder for the specified AssemblyLine.
Throws:
DIException - if an error occurs while deleting log files.

cleanOldEHLogs

public Boolean cleanOldEHLogs(String aConfigId,
                              String aEHName,
                              Date aMinDate)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes those log files of the specified EventHandler, that are older than the specified date.

Specified by:
cleanOldEHLogs in interface SystemLogMBean
Parameters:
aConfigId - identification of the EventHandler's Config Instance.
aEHName - the name of the EventHandler whose logs will be cleaned up.
aMinDate - only log files that were last modified before this date will be deleted.
Returns:
a Boolean that holds true if the log files were deleted successfully; and null if there is no log folder for the specified EventHandler.
Throws:
DIException - if an error occurs while deleting log files.

cleanOldEHLogs

public Boolean cleanOldEHLogs(String aConfigId,
                              String aEHName,
                              Integer aKeepNum)
                       throws DIException
Description copied from interface: SystemLogMBean
Deletes all log files of the specified EventHandler except those generated on the "aKeepNum" latest EventHandler runs.

Specified by:
cleanOldEHLogs in interface SystemLogMBean
Parameters:
aConfigId - identification of the EventHandler's Config Instance.
aEHName - the name of the EventHandler whose logs will be cleaned up.
aKeepNum - specifies the number of the latest log files that should not be deleted; If for example, aKeepNum == 5 only the 5 latest EventHandler's log files will not be deleted.
Returns:
a Boolean that holds true if the log files were deleted successfully; and null if there is no log folder for the specified EventHandler.
Throws:
DIException - if an error occurs while deleting log files.