FileDocCategorySizeDatePackage
TraceEventHelper.javaAPI DocGlassfish v2 API10734Fri May 04 22:32:52 BST 2007com.sun.appserv.management.event

TraceEventHelper

public class TraceEventHelper extends Object

Fields Summary
public static final String
REQUEST_ID
public static final String
REQUEST_TYPE
public static final String
CALLER_IPADDRESS
public static final String
CALLER_PRINCIPAL
public static final String
NANO_TIME
public static final String
THREAD_ID
public static final String
METHOD_NAME
public static final String
COMPONENT_TYPE
public static final String
COMPONENT_NAME
public static final String
APPLICATION_NAME
public static final String
MODULE_NAME
public static final String
TRANSACTION_ID
public static final String
SECURITY_ID
public static final String
EXCEPTION
public static final String
EXCEPTION_OBJECT
public static final String
REQUEST_START
public static final String
REQUEST_END
public static final String
WEB_COMPONENT_METHOD_ENTRY
public static final String
WEB_COMPONENT_METHOD_EXIT
public static final String
EJB_COMPONENT_METHOD_ENTRY
public static final String
EJB_COMPONENT_METHOD_EXIT
private Map
userData
Constructors Summary
public TraceEventHelper(Notification notif)





       
        if (notif.getUserData() == null)
            throw new IllegalArgumentException();
        Object uData = notif.getUserData();
        if (!(uData instanceof Map)) {
            throw new IllegalArgumentException();
        }
        this.userData = (HashMap)((HashMap)uData).clone();
    
public TraceEventHelper(Map userData)

        this.userData = (HashMap)((HashMap)userData).clone();
    
Methods Summary
public java.lang.StringgetApplicationName()

        return (String)userData.get(APPLICATION_NAME);
    
public static java.lang.StringgetApplicationName(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(APPLICATION_NAME);
        } else {
          return null;
        }
    
public java.lang.StringgetCallerIP()

        return (String)userData.get(CALLER_IPADDRESS);
    
public static java.lang.StringgetCallerIP(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(CALLER_IPADDRESS);
        } else {
          return null;
        }
    
public static java.lang.StringgetCallerPrincipal(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(CALLER_PRINCIPAL);
        } else {
          return null;
        }
    
public java.lang.StringgetCallerPrincipal()

        return (String)userData.get(CALLER_PRINCIPAL);
    
public java.lang.StringgetComponentName()

        return (String)userData.get(COMPONENT_NAME);
    
public static java.lang.StringgetComponentName(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(COMPONENT_NAME);
        } else {
          return null;
        }
    
public java.lang.StringgetComponentType()

        return (String)userData.get(COMPONENT_TYPE);
    
public static java.lang.StringgetComponentType(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(COMPONENT_TYPE);
        } else {
          return null;
        }
    
public java.lang.ThrowablegetExceptionObject()

        return (Throwable)userData.get(EXCEPTION_OBJECT);
    
public static java.lang.ThrowablegetExceptionObject(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (Throwable)((Map)userData).get(EXCEPTION_OBJECT);
        } else {
          return null;
        }
    
public java.lang.StringgetExceptionString()

        return (String)userData.get(EXCEPTION);
    
public static java.lang.StringgetExceptionString(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(EXCEPTION);
        } else {
          return null;
        }
    
public java.lang.StringgetMethodName()

        return (String)userData.get(METHOD_NAME);
    
public static java.lang.StringgetMethodName(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(METHOD_NAME);
        } else {
          return null;
        }
    
public java.lang.StringgetModuleName()

        return (String)userData.get(MODULE_NAME);
    
public static java.lang.StringgetModuleName(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(MODULE_NAME);
        } else {
          return null;
        }
    
public java.lang.LonggetNanoTime()

        return (Long)userData.get(NANO_TIME);
    
public static java.lang.LonggetNanoTime(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (Long)((Map)userData).get(NANO_TIME);
        } else {
          return -1L;
        }
    
public java.lang.StringgetRequestId()

        return (String)userData.get(REQUEST_ID);
    
public java.lang.StringgetRequestId(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(REQUEST_ID);
        } else {
          return null;
        }
    
public java.lang.StringgetRequestType()

        return (String)userData.get(REQUEST_TYPE);
    
public static java.lang.StringgetRequestType(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(REQUEST_TYPE);
        } else {
          return null;
        }
    
public java.lang.StringgetSecurityID()

        return (String)userData.get(SECURITY_ID);
    
public static java.lang.StringgetSecurityID(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(SECURITY_ID);
        } else {
          return null;
        }
    
public java.lang.StringgetThreadID()

        return (String)userData.get(THREAD_ID);
    
public static java.lang.StringgetThreadId(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(THREAD_ID);
        } else {
          return null;
        }
    
public java.lang.StringgetTransactionID()

        return (String)userData.get(TRANSACTION_ID);
    
public static java.lang.StringgetTransactionID(javax.management.Notification notification)

        Object userData = notification.getUserData();
        if (userData != null) {
            return (String)((Map)userData).get(TRANSACTION_ID);
        } else {
          return null;
        }