Package com.ibm.di.api.jmx.mbeans
Class SystemLog
- java.lang.Object
-
- com.ibm.di.api.jmx.mbeans.BaseAdmin
-
- com.ibm.di.api.jmx.mbeans.SystemLog
-
- All Implemented Interfaces:
BaseAdminMBean,BaseMBean,SystemLogMBean
public class SystemLog extends BaseAdmin implements SystemLogMBean
This class implements various methods for getting system log information.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMBEAN_IDId of the MBean.static java.lang.StringMBEAN_TYPEType of the MBean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcleanALLogs(java.lang.String aConfigId, java.lang.String aALName, java.lang.String[] logsToBeDeleted)Deletes all the logs which are specified in "logsToBeDeleted" array.voidcleanAllOldALLogs(java.lang.Integer aKeepNum)Deletes all AssemblyLines' log files except those generated on the "aKeepNum" latest runs of all AssemblyLines.voidcleanAllOldALLogs(java.util.Date aMinDate)Deletes all AssemblyLines' log files older than the specified date.voidcleanAllOldLogs(java.lang.Integer aKeepNum)Deletes all log files except those generated on the "aKeepNum" latest runs of all components.voidcleanAllOldLogs(java.util.Date aMinDate)Deletes all log files older than the specified date.java.lang.BooleancleanOldALLogs(java.lang.String aConfigId, java.lang.String aALName, java.lang.Integer aKeepNum)Deletes all log files of the specified AssemblyLine except those generated on the "aKeepNum" latest AssemblyLine runs.java.lang.BooleancleanOldALLogs(java.lang.String aConfigId, java.lang.String aALName, java.util.Date aMinDate)Deletes those log files of the specified AssemblyLine, that are older than the specified date.java.lang.BooleancleanOldALLogs(java.lang.String aConfigId, java.lang.String aALName, java.util.Date aMinDate, java.util.Date aMaxDate)Deletes those log files of the specified AssemblyLine, that are older than the specified date.java.lang.StringgetALLastLogFileName(java.lang.String aConfigId, java.lang.String aALName)Returns the name of the log file created on the last run of a given AssemblyLine.java.lang.StringgetALLog(java.lang.String aConfigId, java.lang.String aALName, java.lang.String aLogFileName)Given an AssemblyLine identification, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.java.lang.String[]getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName)Returns the names of all available log files for a given AssemblyLine.java.lang.String[]getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName, int n)Returns the names of all 'n' log files for a given AssemblyLine.java.lang.String[]getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName, java.util.Date dDate)Returns the names of all available log files prior to the specified 'date' for a given AssemblyLine.java.lang.String[]getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName, java.util.Date startDate, java.util.Date endDate)Returns the names of all available log files prior to the specified 'date' for a given AssemblyLine.java.lang.StringgetALLogLastChunk(java.lang.String aConfigId, java.lang.String aALName, java.lang.String aLogFileName, java.lang.Integer aKilobytes)Retrieves the last chunk from a specified AssemblyLine's log file.java.lang.StringgetId()Reads attribute "Id".java.lang.StringgetType()Reads attribute "Type".-
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
-
-
-
-
Field Detail
-
MBEAN_TYPE
public static final java.lang.String MBEAN_TYPE
Type of the MBean.- See Also:
- Constant Field Values
-
MBEAN_ID
public static final java.lang.String MBEAN_ID
Id of the MBean.- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public java.lang.String getType()
Reads attribute "Type".getType()andgetId()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".
-
getId
public java.lang.String getId()
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.getType()andgetId()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".
-
getALLogFileNames
public java.lang.String[] getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName) throws DIExceptionReturns the names of all available log files for a given AssemblyLine.- Specified by:
getALLogFileNamesin interfaceSystemLogMBean- 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.
-
getALLogFileNames
public java.lang.String[] getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName, int n) throws DIExceptionReturns the names of all 'n' log files for a given AssemblyLine.- Specified by:
getALLogFileNamesin interfaceSystemLogMBean- Parameters:
aConfigId- identification of the AssemblyLine's Config Instance.aALName- the name of the AssemblyLine.n- the max number of log files to be returned. If n exceeds the number of available log files then all the log files names are returned.- 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.
-
getALLogFileNames
public java.lang.String[] getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName, java.util.Date dDate) throws DIExceptionReturns the names of all available log files prior to the specified 'date' for a given AssemblyLine.- Specified by:
getALLogFileNamesin interfaceSystemLogMBean- Parameters:
aConfigId- identification of the AssemblyLine's Config Instance.aALName- the name of the AssemblyLine.dDate- all the log files prior to this date will be listed.- 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.
-
getALLogFileNames
public java.lang.String[] getALLogFileNames(java.lang.String aConfigId, java.lang.String aALName, java.util.Date startDate, java.util.Date endDate) throws DIExceptionReturns the names of all available log files prior to the specified 'date' for a given AssemblyLine.- Specified by:
getALLogFileNamesin interfaceSystemLogMBean- Parameters:
aConfigId- identification of the AssemblyLine's Config Instance.aALName- the name of the AssemblyLine.startDate- all the log files after this date will be listed.endDate- all the log files before this date will be listed.- 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 java.lang.String getALLastLogFileName(java.lang.String aConfigId, java.lang.String aALName) throws DIExceptionReturns the name of the log file created on the last run of a given AssemblyLine.- Specified by:
getALLastLogFileNamein interfaceSystemLogMBean- 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 java.lang.String getALLog(java.lang.String aConfigId, java.lang.String aALName, java.lang.String aLogFileName) throws DIExceptionGiven an AssemblyLine identification, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.- Specified by:
getALLogin interfaceSystemLogMBean- 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 specified log of the AssemblyLine.
- Throws:
DIException- if an error occurs while obtaining AssemblyLine's log.
-
getALLogLastChunk
public java.lang.String getALLogLastChunk(java.lang.String aConfigId, java.lang.String aALName, java.lang.String aLogFileName, java.lang.Integer aKilobytes) throws DIExceptionRetrieves the last chunk from a specified AssemblyLine's log file.- Specified by:
getALLogLastChunkin interfaceSystemLogMBean- 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.
-
cleanAllOldLogs
public void cleanAllOldLogs(java.util.Date aMinDate) throws DIExceptionDeletes all log files older than the specified date.- Specified by:
cleanAllOldLogsin interfaceSystemLogMBean- 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(java.lang.Integer aKeepNum) throws DIExceptionDeletes all log files except those generated on the "aKeepNum" latest runs of all components.- Specified by:
cleanAllOldLogsin interfaceSystemLogMBean- 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(java.util.Date aMinDate) throws DIExceptionDeletes all AssemblyLines' log files older than the specified date.- Specified by:
cleanAllOldALLogsin interfaceSystemLogMBean- 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(java.lang.Integer aKeepNum) throws DIExceptionDeletes all AssemblyLines' log files except those generated on the "aKeepNum" latest runs of all AssemblyLines.- Specified by:
cleanAllOldALLogsin interfaceSystemLogMBean- 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.
-
cleanOldALLogs
public java.lang.Boolean cleanOldALLogs(java.lang.String aConfigId, java.lang.String aALName, java.util.Date aMinDate) throws DIExceptionDeletes those log files of the specified AssemblyLine, that are older than the specified date.- Specified by:
cleanOldALLogsin interfaceSystemLogMBean- 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
Booleanthat holdstrueif the log files were deleted successfully; andnullif there is no log folder for the specified AssemblyLine. - Throws:
DIException- if an error occurs while deleting log files.
-
cleanOldALLogs
public java.lang.Boolean cleanOldALLogs(java.lang.String aConfigId, java.lang.String aALName, java.util.Date aMinDate, java.util.Date aMaxDate) throws DIExceptionDeletes those log files of the specified AssemblyLine, that are older than the specified date.- Specified by:
cleanOldALLogsin interfaceSystemLogMBean- 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 after this date will be deleted.aMaxDate- only log files that were last modified before this date will be deleted.- Returns:
- a
Booleanthat holdstrueif the log files were deleted successfully; andnullif there is no log folder for the specified AssemblyLine. - Throws:
DIException- if an error occurs while deleting log files.
-
cleanOldALLogs
public java.lang.Boolean cleanOldALLogs(java.lang.String aConfigId, java.lang.String aALName, java.lang.Integer aKeepNum) throws DIExceptionDeletes all log files of the specified AssemblyLine except those generated on the "aKeepNum" latest AssemblyLine runs.- Specified by:
cleanOldALLogsin interfaceSystemLogMBean- 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 == 5only the 5 latest AssemblyLine's log files will not be deleted.- Returns:
- a
Booleanthat holdstrueif the log files were deleted successfully; andnullif there is no log folder for the specified AssemblyLine. - Throws:
DIException- if an error occurs while deleting log files.
-
cleanALLogs
public java.lang.String cleanALLogs(java.lang.String aConfigId, java.lang.String aALName, java.lang.String[] logsToBeDeleted) throws DIExceptionDeletes all the logs which are specified in "logsToBeDeleted" array.- Specified by:
cleanALLogsin interfaceSystemLogMBean- Parameters:
aConfigId- identification of the AssemblyLine's Config Instance.aALName- the name of the AssemblyLine whose logs will be cleaned up.logsToBeDeleted- name of the log files which are to be deleted.- Returns:
- a
Stringthat holdsnullif the log files are deleted successfully; else comma separated names of the log files which are not deleted. - Throws:
DIException- if an error occurs while deleting log files.
-
-