|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wgen.op.logging.TraceKeyFactory
Makes TraceKeys in some consistent way, and handles storing in HttpServletRequest attributes.
| Field Summary | |
private static long |
_counter
Static counter to disambiguate simultaneous requests. |
static java.lang.String |
REQUEST_KEY__TRACE_KEY
The key in the HttpServletRequest attributes that contains the TraceKey. |
static java.lang.String |
SESSION_KEY__USER_ID
The key in the HttpSession attributes that contains the end user's Id which will become a Long in the TraceKey. |
| Constructor Summary | |
TraceKeyFactory()
|
|
| Method Summary | |
private static long |
getNextCounterValue()
Internal static counter to disambiguate among simultaneous requests. |
static TraceKey |
getTraceKey(javax.servlet.http.HttpServletRequest request)
A TraceKey pulled from the request attributes, or if it doesn't exist, generated using information from the request. |
static TraceKey |
makeKey(java.lang.Long userId,
OpModule module)
For legacy areas where you may not have access to the request, make a key given a userId and module. |
private static TraceKey |
makeKey(java.lang.Long userId,
java.lang.String requestUrl)
Make a key given an userId. |
static TraceKey |
makeTemporaryKey(java.lang.Long userId,
java.lang.Class clazz)
In a legacy area, make a TraceKey whose OpModule is determined by the class passed in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String REQUEST_KEY__TRACE_KEY
public static final java.lang.String SESSION_KEY__USER_ID
private static long _counter
| Constructor Detail |
public TraceKeyFactory()
| Method Detail |
private static TraceKey makeKey(java.lang.Long userId,
java.lang.String requestUrl)
userId - the current user, if any, or 0 if the user is not knownrequestUrl - the url requested that will be claimed by some application
public static TraceKey makeKey(java.lang.Long userId,
OpModule module)
userId - the userId responsible for this behavior's executionmodule - the module responsible for the code being executed
public static TraceKey makeTemporaryKey(java.lang.Long userId,
java.lang.Class clazz)
userId - clazz -
OpModuleRegistry.lookUpModule(Class),
OpModule.getClassMatchLength(Class)private static long getNextCounterValue()
public static final TraceKey getTraceKey(javax.servlet.http.HttpServletRequest request)
request -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||