Class ServiceState
java.lang.Object
com.invirgance.convirgance.web.servlet.ServiceState
Records the current state of the Service using a ThreadLocal so that pluggable
objects can access the state during execution.
- Author:
- jbanes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Get the key configured by the current Service. e.g.static void
release()
Clears the thread local of information to prepare the thread for reuse, prevent leaking of information, and avoid memory leaksstatic void
Sets the key/value pair on the thread local
-
Constructor Details
-
ServiceState
public ServiceState()
-
-
Method Details
-
get
Get the key configured by the current Service. e.g. "parameters" is often a JSONObject containing parameters collected from the request, session, and other locations.- Parameters:
key
- the key to look up- Returns:
- the value of the key if found, null otherwise
-
set
Sets the key/value pair on the thread local- Parameters:
key
- the key to setvalue
- the value to set for the key
-
release
public static void release()Clears the thread local of information to prepare the thread for reuse, prevent leaking of information, and avoid memory leaks
-