BEA Systems, Inc.

BEA WebLogic Server 9.0 API Reference


weblogic.management.logging
Class WebLogicLogNotification

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.management.Notification
          extended byweblogic.management.logging.WebLogicLogNotification
All Implemented Interfaces:
Serializable

public final class WebLogicLogNotification
extends Notification

This class is the type of Notifications which are generated by the LogBroadcasterRuntimeMBean in the server for log messages. JMX notification listeners registering to LogBroadcasterRuntimeMBean get a notification of this type when their handleNotification() methods are invoked. The getters on this class return the respective fields (as indicated by the name) of the log message on behalf of which this notification was created.

See Also:
LogBroadcasterRuntimeMBean, NotificationListener, NotificationBroadcaster, Serialized Form
Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Field Summary
 
Fields inherited from class javax.management.Notification
source
 
Method Summary
 String getDiagnosticContextId()
          Gets the diagnostic context id associated with the log event.
 String getId()
          Returns the full message id from the log entry.
 String getMachineName()
          Gets the machineName attribute of the WebLogicLogNotification object
 int getMessageId()
          Server log message ids are of the form [prefix-]id, where the prefix for WLS messages is "BEA", eg BEA-123456.
 String getMessageIdString()
          Returns the numeric id as a 6 digit string.
 String getServername()
          Gets the servername attribute of the WebLogicLogNotification object
 int getSeverity()
          Gets the severity attribute of the WebLogicLogNotification object
 String getSubsystem()
          Identifies the subsystem responsible for logging the message.
 String getThreadId()
          Gets the threadId attribute of the WebLogicLogNotification object
 Throwable getThrowable()
          Gets the throwable attribute of the WebLogicLogNotification object
 String getTransactionId()
          Gets the transactionId attribute of the WebLogicLogNotification object
 String getType()
          This returns the notification type, as defined by JMX.
 String getUserId()
          Gets the userId attribute of the WebLogicLogNotification object
 int getVersion()
          Returns the version number for this WebLogicLogNotification.
 
Methods inherited from class javax.management.Notification
getMessage, getSequenceNumber, getTimeStamp, getUserData, setSequenceNumber, setSource, setTimeStamp, setUserData, toString
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDiagnosticContextId

public String getDiagnosticContextId()
Gets the diagnostic context id associated with the log event.

Returns:
The diagnostic context id of the log event represented by this notification.

getId

public String getId()
Returns the full message id from the log entry. This may include a prefix. eg BEA-123456. A null value is returned if a message id was not included in the notification.

Returns:
The id value

getMachineName

public String getMachineName()
Gets the machineName attribute of the WebLogicLogNotification object

Returns:
The machineName value

getMessageId

public int getMessageId()
Server log message ids are of the form [prefix-]id, where the prefix for WLS messages is "BEA", eg BEA-123456. The actual id is a 6 digit string. This method returns a int representation of the id portion only. If the id contains non-numeric characters a -1 is returned.

Returns:
numeric message id. -1 is returned if the notification did not include a message id or was non-numeric.

getMessageIdString

public String getMessageIdString()
Returns the numeric id as a 6 digit string. If prefixes are not being used this is the same as getId(). Otherwise, the returned value is the id with the prefix removed.

Returns:
The messageIdString value

getServername

public String getServername()
Gets the servername attribute of the WebLogicLogNotification object

Returns:
The servername value

getSeverity

public int getSeverity()
Gets the severity attribute of the WebLogicLogNotification object

Returns:
The severity value

getSubsystem

public String getSubsystem()
Identifies the subsystem responsible for logging the message.

Returns:
The subsystem value

getThreadId

public String getThreadId()
Gets the threadId attribute of the WebLogicLogNotification object

Returns:
The threadId value

getThrowable

public Throwable getThrowable()
Gets the throwable attribute of the WebLogicLogNotification object

Returns:
The throwable value

getTransactionId

public String getTransactionId()
Gets the transactionId attribute of the WebLogicLogNotification object

Returns:
The transactionId value

getType

public String getType()
This returns the notification type, as defined by JMX. The value returned includes the subsystem responsible for logging the message and the message id. The id may contain a prefix, so should not be assumed to be numeric. To obtain the numeric version of the id use the getMessageId() method. The getId() method can be used to obtain the logged version of the id. To obtain the subsystem identifier, the getSubsystem() method is recommended.

Returns:
type Format = weblogic.logMessage.<subSystem>.<messageId>

getUserId

public String getUserId()
Gets the userId attribute of the WebLogicLogNotification object

Returns:
The userId value

getVersion

public final int getVersion()
Returns the version number for this WebLogicLogNotification. This denotes the contents and format of the notification.

Returns:
The version value

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs90
Copyright 2005 BEA Systems Inc.