Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.1.0)

E17486-02

oracle.adf.share.logging.internal
Class LoggingUtils

java.lang.Object
  extended by oracle.adf.share.logging.internal.LoggingUtils

public class LoggingUtils
extends java.lang.Object

This class contains some Logging utility functions


Method Summary
static void deactivateExecutionContext()
          Deactivate ExecutionContext of current thread (the child thread) This method should be called on child thread, when child thread no longer works for parent thread (in case of worker thread)
static java.lang.String getECID()
          Get ECID for current running thread
static java.lang.String getNounType(java.lang.String groupName)
          Get noun type from group name which is in the format of /oracle/component_id/noun1/noun2/.../nounN
static java.lang.String getUrl(javax.servlet.http.HttpServletRequest request)
          Get url for the http servlet request
static boolean isDMSLoggingEnabled(java.util.logging.Level level)
          Check if the DMS's level enables or disables current sensor level.
static java.lang.String newChildExecutionContext()
          Create a new ExecutionContext for a child of current thread This method should be called on parent thread.
static void setExecutionContext(java.lang.String key)
          Set ExecutionContext for a child This method should be called on child thread, passing the key returned from newChildExecutionContext()
static java.lang.StringBuffer standardizeGroupName(java.lang.String groupName)
          Standardize groupName
static java.lang.String standardizeSensorName(java.lang.String name)
          Standardize sensor name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getECID

public static java.lang.String getECID()
Get ECID for current running thread

Returns:
the ecid string

getNounType

public static java.lang.String getNounType(java.lang.String groupName)
Get noun type from group name which is in the format of /oracle/component_id/noun1/noun2/.../nounN

Parameters:
groupName -
Returns:
noun type which comes from the second field of the groupName

isDMSLoggingEnabled

public static boolean isDMSLoggingEnabled(java.util.logging.Level level)
Check if the DMS's level enables or disables current sensor level. If running inside the IDE, this always returns false.

Parameters:
level - the sensor level to be compared with DMS's level
Returns:
true means enabled; false means disabled

getUrl

public static java.lang.String getUrl(javax.servlet.http.HttpServletRequest request)
Get url for the http servlet request

If the request is get, append query string

If the request is post, append post parameter except state

distinguish the request type by prepend "get" or "post"


standardizeGroupName

public static java.lang.StringBuffer standardizeGroupName(java.lang.String groupName)
Standardize groupName

Check and prepend beginning slash; replace spaces with '_'

Parameters:
groupName - original group name
Returns:
standardized group name

standardizeSensorName

public static java.lang.String standardizeSensorName(java.lang.String name)
Standardize sensor name

replace all spaces with '_'

Parameters:
name - original sensor name
Returns:
standardized sensor name

newChildExecutionContext

public static java.lang.String newChildExecutionContext()
Create a new ExecutionContext for a child of current thread This method should be called on parent thread.

Returns:
a reference object to find child execution context created in this method and passed to setExecutionContext() in child thread so parent-child execution context association is established

setExecutionContext

public static void setExecutionContext(java.lang.String key)
Set ExecutionContext for a child This method should be called on child thread, passing the key returned from newChildExecutionContext()

Parameters:
ket - a reference object to set into child thread so parent-child association is established for ExecutionContext

deactivateExecutionContext

public static void deactivateExecutionContext()
Deactivate ExecutionContext of current thread (the child thread) This method should be called on child thread, when child thread no longer works for parent thread (in case of worker thread)


Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.1.0)

E17486-02

Copyright © 1997, 2011, Oracle. All rights reserved.