|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.Parameter com.jniwrapper.Pointer.Void com.jniwrapper.win32.Handle com.jniwrapper.win32.system.eventlog.EventLog
public class EventLog
This class provides functionality for working with system event logs.
Field Summary |
---|
Fields inherited from class com.jniwrapper.win32.Handle |
---|
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0 |
Fields inherited from class com.jniwrapper.Parameter |
---|
LICENSE_TYPE, V |
Constructor Summary | |
---|---|
EventLog(java.lang.String logName)
Opens an event log for reading. |
|
EventLog(java.lang.String serverName,
java.lang.String logName)
Opens a remote event log for reading. |
Method Summary | |
---|---|
void |
backup(java.io.File file)
Backs up the opened event log to a file. |
void |
clear()
Clears the opened event log. |
void |
close()
Closes the event log handle. |
java.lang.String |
getLogName()
Returns the name of the opened log. |
java.util.List |
getMessages()
Returns the list of event log messages. |
int |
getRecordsCount()
Returns the number of records in the event log. |
java.lang.String |
getServerName()
If a remote event log has been opened, then the function returns the name of the remote server. |
static EventLog |
openBackup(java.io.File backup)
Opens the event log that was backed up. |
static void |
reportEvent(EventLogMessage message)
Posts the message to an event log. |
Methods inherited from class com.jniwrapper.win32.Handle |
---|
clone, closeHandle, equals, waitFor, waitFor |
Methods inherited from class com.jniwrapper.Pointer.Void |
---|
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
Methods inherited from class com.jniwrapper.Parameter |
---|
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EventLog(java.lang.String logName)
logName
- specifies the name of the log to be opened.public EventLog(java.lang.String serverName, java.lang.String logName)
serverName
- is the UNC name of the server.logName
- specifies the name of the log to be opened.Method Detail |
---|
public java.lang.String getLogName()
public java.lang.String getServerName()
null
.
public static EventLog openBackup(java.io.File backup)
backup
- specifies the backup file.
public void backup(java.io.File file)
file
- specifies the backup file.public void close()
public void clear()
public int getRecordsCount()
public java.util.List getMessages()
EventLogMessage
.
EventLogMessage
public static void reportEvent(EventLogMessage message)
message
- specifies the message to be posted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |