|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.axiom.reasoning.rules.service.ContextWrapper
Implements a wrapper for vendor-specific contexts
Field Summary | |
protected long |
creationTime
The creation time |
protected long |
expirationAge
The expiration Age |
protected int |
expirationPolicy
The expiration policy |
protected long |
expirationUseCount
The use count limit |
static int |
EXPIRE_CONTEXT_AT_AGE
The code for the "age-limit-reached" context expiration policy |
static int |
EXPIRE_CONTEXT_AT_USE_COUNT
The code for the "use-limit-reached" context expiration policy |
static int |
EXPIRE_CONTEXT_NEVER
The code for the "never" context expiration policy |
protected long |
useCount
The use count |
protected com.beasys.commerce.axiom.reasoning.rules.serviceProvider.Context |
wrappedContext
The wrapped context |
Constructor Summary | |
ContextWrapper()
Constructor |
Method Summary | |
void |
addObject(java.lang.Object object)
Adds an object to the context's working memory. |
int |
fireAllRules()
Fires all of the rules which are active for the context. |
int |
fireRules(int maxRules)
Fires rules until there are no more to fire or until maxRules rules have been fired. |
boolean |
getExpired()
Gets the expired property |
java.util.Set |
getObjects(java.lang.Class filter)
Gets a filtered list of objects from the context |
long |
getUseCount()
Gets the use count |
void |
halt()
Halts firing of rules. |
void |
incrementUseCount()
Increments the usage count |
void |
initialize()
Initializes the context. |
void |
release()
Release the context and any resources it might be using. |
void |
removeAllObjects()
Removes all objects from the context's working memory. |
void |
resetUseCount()
Resets the use count to zero |
void |
setCreationTime()
Sets the creation time |
void |
setExpirationAge(long expirationAge)
Sets the expiration age |
void |
setExpirationPolicy(int expirationPolicy)
Sets the expiration policy |
void |
setExpirationUseCount(long expirationUseCount)
Sets the expiration use count |
void |
setWrappedContext(com.beasys.commerce.axiom.reasoning.rules.serviceProvider.Context wrappedContext)
Sets the wrapped context |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int EXPIRE_CONTEXT_NEVER
public static final int EXPIRE_CONTEXT_AT_AGE
public static final int EXPIRE_CONTEXT_AT_USE_COUNT
protected long creationTime
protected long expirationAge
protected int expirationPolicy
protected long expirationUseCount
protected long useCount
protected com.beasys.commerce.axiom.reasoning.rules.serviceProvider.Context wrappedContext
Constructor Detail |
public ContextWrapper()
Method Detail |
public void addObject(java.lang.Object object) throws java.lang.IllegalArgumentException, RulesServiceException
object
- The object to be added.public int fireAllRules() throws RulesServiceException
public int fireRules(int maxRules) throws java.lang.IllegalArgumentException, RulesServiceException
maxRules
- The maximum number of rules to firepublic boolean getExpired()
public java.util.Set getObjects(java.lang.Class filter) throws java.lang.IllegalArgumentException, RulesServiceException
clsFilter
- the list of Classes which describe what type of
objects to return from the working memory.public long getUseCount()
public void halt() throws RulesServiceException
public void incrementUseCount()
public void initialize() throws RulesServiceException
public void release() throws RulesServiceException
public void removeAllObjects() throws RulesServiceException
public void resetUseCount()
public void setCreationTime()
public void setExpirationAge(long expirationAge) throws java.lang.IllegalArgumentException
expirationAge
- The expiration agepublic void setExpirationPolicy(int expirationPolicy) throws java.lang.IllegalArgumentException
expirationPolicy
- The expiration policypublic void setExpirationUseCount(long expirationUseCount) throws java.lang.IllegalArgumentException
expirationUseCount
- The expiration use countpublic void setWrappedContext(com.beasys.commerce.axiom.reasoning.rules.serviceProvider.Context wrappedContext) throws java.lang.IllegalArgumentException
wrappedContext
- The wrapped context
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |