public class LogRuntime extends RuntimeMBeanDelegate implements LogRuntimeMBean
Modifier and Type | Field and Description |
---|---|
private RotatingFileOutputStream |
rotatingFileOutputStream
The rotating file output stream
|
descriptor, name, parent, registered, type
Constructor and Description |
---|
LogRuntime(LogFileMBean logfileMBean,
RuntimeMBean parent)
Public constructor for the LogBroadcaster object required for JMX compliance.
|
LogRuntime(java.lang.String name,
RuntimeMBean parent,
RotatingFileOutputStream ros)
Public constructor for the LogBroadcaster object required for JMX compliance.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
ensureLogOpened()
Ensures that that the output stream to the underlying is
opened if it got closed previously due to errors.
|
void |
flushLog()
Flushes the buffer to the log file on disk.
|
void |
forceLogRotation()
Force the rotation of the underlying log.
|
java.lang.String |
getCurrentLogFile()
Gets the current log file absolute path.
|
java.lang.String |
getLogRotationDir()
Gets the log file rotation dir path.
|
java.util.SortedSet<LogFileRotator.FileInfo> |
getRotatedLogFiles()
Gets the set of rotated files sorted by timestamp.
|
boolean |
isLogFileStreamOpened()
Gets the opened state of the log file stream represented by this instance.
|
_createHelper, _postSet, _postSet, _postSet, _postSet, _postSet, addChild, addNotificationListener, addPropertyChangeListener, createChildCopy, getAttribute, getAttributes, getMBeanInfo, getMetaData, getName, getNotificationInfo, getObjectName, getParent, getParentAttribute, getPropertyChangeListeners, getRegistrationManager, getRestParent, getType, invoke, isCachingDisabled, isEditable, isRegistered, pluralize, postDeregister, postRegister, preDeregister, preRegister, register, removeChild, removeNotificationListener, removePropertyChangeListener, setAttribute, setAttributes, setMetaData, setName, setParent, setRestParent, setRuntimeMBeanHelper, setType, unregister
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, preDeregister, removePropertyChangeListener
getMBeanInfo, getName, getObjectName, getParent, getType, isCachingDisabled, isRegistered, setName, setParent
getAttribute, getAttributes, invoke, setAttribute, setAttributes
private RotatingFileOutputStream rotatingFileOutputStream
public LogRuntime(LogFileMBean logfileMBean, RuntimeMBean parent) throws ManagementException
ManagementException
- Description of the Exceptionpublic LogRuntime(java.lang.String name, RuntimeMBean parent, RotatingFileOutputStream ros) throws ManagementException
ManagementException
- Description of the Exceptionpublic void forceLogRotation() throws ManagementException
forceLogRotation
in interface LogRuntimeMBean
ManagementException
public void ensureLogOpened() throws ManagementException
LogRuntimeMBean
ensureLogOpened
in interface LogRuntimeMBean
ManagementException
- If the log could not be opened successfully.public void close() throws ManagementException
ManagementException
public void flushLog() throws ManagementException
LogRuntimeMBean
flushLog
in interface LogRuntimeMBean
ManagementException
- If the log could not be flushed successfully.public java.util.SortedSet<LogFileRotator.FileInfo> getRotatedLogFiles()
LogRuntimeMBean
getRotatedLogFiles
in interface LogRuntimeMBean
public java.lang.String getCurrentLogFile()
LogRuntimeMBean
getCurrentLogFile
in interface LogRuntimeMBean
public java.lang.String getLogRotationDir()
LogRuntimeMBean
getLogRotationDir
in interface LogRuntimeMBean
public boolean isLogFileStreamOpened()
LogRuntimeMBean
isLogFileStreamOpened
in interface LogRuntimeMBean