|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.services.EnvironmentImpl
public class EnvironmentImpl
A non-threadsafe implementation (expects to use the "perthread" service lifecyle).
Constructor Summary | |
---|---|
EnvironmentImpl()
|
Method Summary | ||
---|---|---|
void |
clear()
Clears all stacks; no longer used by Tapestry. |
|
void |
cloak()
Hides all current environment values, making the Environment object appear empty, until a call to Environment.decloak() } restores the original state. |
|
void |
decloak()
Restores state previously hidden by Environment.cloak() }. |
|
|
peek(Class<T> type)
Peeks at the current top of the indicated stack. |
|
|
peekRequired(Class<T> type)
Peeks at the current top of the indicated stack (which must have a non-null value). |
|
|
pop(Class<T> type)
Removes and returns the top environmental object of the selected type. |
|
|
push(Class<T> type,
T instance)
Pushes a new service onto the stack. |
|
void |
threadDidCleanup()
Invoked by PerthreadManager service when a thread performs and
end-of-request cleanup. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EnvironmentImpl()
Method Detail |
---|
public <T> T peek(Class<T> type)
Environment
peek
in interface Environment
T
- the type of environmental objecttype
- class used to select the object
public <T> T peekRequired(Class<T> type)
Environment
peekRequired
in interface Environment
T
- the type of environmental objecttype
- class used to select the object
public <T> T pop(Class<T> type)
Environment
pop
in interface Environment
T
- the type of environmental objecttype
- class used to select the object
public <T> T push(Class<T> type, T instance)
Environment
push
in interface Environment
T
- the type of environmental objecttype
- class used to select the objectinstance
- the service object
public void clear()
Environment
clear
in interface Environment
public void threadDidCleanup()
ThreadCleanupListener
PerthreadManager
service when a thread performs and
end-of-request cleanup.
threadDidCleanup
in interface ThreadCleanupListener
public void cloak()
Environment
Environment.decloak()
} restores the original state.
cloak
in interface Environment
public void decloak()
Environment
Environment.cloak()
}.
decloak
in interface Environment
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |