Servertec
Foundation Classes
1.3.3 09/04/2005

stec.sfc.Win32
Class EventLogRecord

java.lang.Object
  extended by stec.sfc.Win32.EventLogRecord

public final class EventLogRecord
extends java.lang.Object

The event log record retrieved by EventLog.get(int).

Since:
1.1.0 11/18/2001

Method Summary
 java.lang.String getCategory()
          Returns the category name.
 int getCategoryID()
          Returns the category identifier.
 java.lang.String getComputerName()
          Returns the computer name.
 byte[] getData()
          Returns any binary data.
 int getEventID()
          Returns the event identifier.
 int getEventType()
          Returns the EventLogType.
 java.lang.String[] getExpandedParameters()
          Returns any parameters resolving any references.
 long getGeneratedTimestamp()
          Returns the timestamp in the number of seconds elapsed since 00:00:00 January 1, 1970 UCT when the event log record was submitted.
 java.lang.String getMessage()
          Returns the corresponding formatted message.
 java.lang.String[] getParameters()
          Returns any parameters.
 int getRecordNumber()
          Returns the event log record number.
 java.lang.String getSourceName()
          Returns the event source name.
 java.lang.String getUserName()
          Returns the username.
 long getWrittenTimestamp()
          Returns the timestamp in the number of seconds elapsed since 00:00:00 January 1, 1970 UCT when the event log record was written.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRecordNumber

public final int getRecordNumber()
Returns the event log record number.

Returns:
the record number.

getGeneratedTimestamp

public final long getGeneratedTimestamp()
Returns the timestamp in the number of seconds elapsed since 00:00:00 January 1, 1970 UCT when the event log record was submitted.

Returns:
the timestamp of when the event log record was submitted.

getWrittenTimestamp

public final long getWrittenTimestamp()
Returns the timestamp in the number of seconds elapsed since 00:00:00 January 1, 1970 UCT when the event log record was written.

Returns:
the timestamp of when the event log record was written.

getEventID

public final int getEventID()
Returns the event identifier.

Returns:
the record number.

getEventType

public final int getEventType()
Returns the EventLogType.

Returns:
the record number.

getCategoryID

public final int getCategoryID()
Returns the category identifier.

Returns:
the category identifier.

getCategory

public final java.lang.String getCategory()
                                   throws Win32Exception,
                                          java.io.IOException
Returns the category name.

May result in the Java VM aborting with EXCEPTION_INVALID_ACCESS if the local dll and the remote dll are not the same.

Must be able to access the system registry.

Returns:
the category name.
Throws:
java.io.IOException - if RegistryKey.LOCAL_MACHINE has been closed.
Win32Exception - if any error occurs.

getSourceName

public final java.lang.String getSourceName()
Returns the event source name.

Returns:
the event source name.

getComputerName

public final java.lang.String getComputerName()
Returns the computer name.

Returns:
the computer name.

getUserName

public final java.lang.String getUserName()
Returns the username.

Returns:
the username. null if none. Returns the user name relative to the EventLogRecord's computer name when Local Mode is false and returns the user name relative to the computer the EventLog is on when Local Mode is false. Returns the username when Raw Mode is false and returns the SID when Raw Mode is true or when Raw Mode is false and the username cannot be found.

getParameters

public final java.lang.String[] getParameters()
Returns any parameters.

Returns:
any parameters.

getExpandedParameters

public final java.lang.String[] getExpandedParameters()
                                               throws Win32Exception,
                                                      java.io.IOException
Returns any parameters resolving any references.

Returns:
any parameters. Returns the parameters relative to the EventLogRecord's computer name when Local Mode is false and returns the parameters relative to the computer the EventLog is on when Local Mode is false.
Throws:
Win32Exception
java.io.IOException
Since:
1.3.1 09/07/2004

getData

public final byte[] getData()
Returns any binary data.

Returns:
any binary data.

getMessage

public final java.lang.String getMessage()
                                  throws Win32Exception,
                                         java.io.IOException
Returns the corresponding formatted message.

May result in the Java VM aborting with EXCEPTION_INVALID_ACCESS if the local dll and the remote dll are not the same.

Must be able to access the system registry.

Returns:
any message. Returns the message relative to the EventLogRecord's computer name when Local Mode is false and returns the message relative to the computer the EventLog is on when Local Mode is false.
Throws:
java.io.IOException - if RegistryKey.LOCAL_MACHINE has been closed.
Win32Exception - if any error occurs.

Servertec
Foundation Classes
1.3.3 09/04/2005

Copyright © 2001-2005 Servertec. All rights reserved.