public class Session
extends java.lang.Object
A Session isolates satisfaction of Goals
into an objectified context. Multiple Sessions can
be deployed simultaneously against a Project or
arbitrary Goal graph. Likewise, a single Session
may be used simultaneous against several Projects
or Goal graphs. A caveat with this last idiom
revolves around Goal's implementation of equality
which utilitizes only the Goal's name.
WerkzProject,
Goal| Constructor and Description |
|---|
Session()
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addSatisfiedGoal(Goal goal)
Add a satisfied
Goal to this context. |
void |
clear()
Clear and reset this
Session so that
no Goals are considered satisfied. |
void |
error(java.lang.String msg)
Log an error message.
|
java.lang.Object |
getAttribute(java.lang.String key)
Get an attribute from this
Session. |
java.util.Map |
getAttributes()
Get the attributes from this
Session. |
void |
info(java.lang.String msg)
Log an informative message.
|
(package private) boolean |
isGoalSatisfied(Goal goal)
Test a
Goal to determine if it has been
satisfied within this context. |
(package private) void |
removeSatisfiedGoal(Goal goal)
Remove a satisfied
Goal from this context. |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Set an attribute for this
Session. |
void |
setAttributes(java.util.Map attributes)
Set the attributes for this
Session. |
void |
warn(java.lang.String msg)
Log a warning message.
|
public void clear()
Session so that
no Goals are considered satisfied.void addSatisfiedGoal(Goal goal)
Goal to this context.goal - The Goal that is satisfied.void removeSatisfiedGoal(Goal goal)
Goal from this context.goal - The Goal that is no longer satisfied.boolean isGoalSatisfied(Goal goal)
Goal to determine if it has been
satisfied within this context.goal - The Goal to test.true if the Goal has been
satisfied within this context, otherwise false.public void setAttributes(java.util.Map attributes)
Session.attributes - The attributes for this Session.public java.util.Map getAttributes()
Session.Session.public void setAttribute(java.lang.String key,
java.lang.Object value)
Session.key - Attribute key.value - Attribute value.public java.lang.Object getAttribute(java.lang.String key)
Session.Session.public void info(java.lang.String msg)
msg - The message.public void warn(java.lang.String msg)
msg - The message.public void error(java.lang.String msg)
msg - The message.Copyright © 2001-2013 Apache Software Foundation. All Rights Reserved.