|
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.RulesServiceBean
Implements a rules service bean
Field Summary | |
static long |
CONTEXT_POOL_ACCESS_LIMIT
The context pool access limit |
static java.lang.String |
CONTEXT_POOL_MAX_SIZE
The context wrapper pool max size limit |
static int |
CONTEXT_WRAPPER_CACHE_CAPACITY
The capacity of the context wrapper cache |
protected long |
contextExpirationAge
The context expiration age |
protected int |
contextExpirationPolicy
The context expiration policy |
protected long |
contextExpirationUseCount
The context expiration use count |
protected com.beasys.commerce.axiom.reasoning.rules.service.RulesServiceBean.Stack |
contextWrapperCache
A cache of context wrappers |
protected java.util.HashMap |
contextWrapperPool
The context wrappers used for application of rules |
protected long |
contextWrapperPoolAccessCount
The context wrapper pool access count |
protected int |
contextWrapperPoolMaxSize
The context wrapper pool max size limit |
static java.lang.String |
EXCEPTION_MSG_DELIMITER
The exception message delimiter |
protected boolean |
initialized
A flag indicating whether or not the instance has been initialized |
static java.lang.String |
MIME_TYPE_HANDLERS_MAP
The name of the mime type handlers map environment property |
static java.lang.String |
MIME_TYPE_MAP_DELIMITER
The delimiter used to separate mime type keys from values |
static java.lang.String |
MIME_TYPE_PAIR_DELIMITER
The delimiter used to separate mime type map entries |
static java.lang.String |
MIME_TYPES_MAP
The name of the mime types map environment property |
static float |
POOL_REDUCTION_FACTOR
The size reduction factor used during context wrapper pool maintenance |
protected static int |
RELOAD_RULESETS_NEVER
The code for the "never" rule set reload policy |
static java.lang.String |
RELOAD_RULESETS_NEVER_STRING
The code string for the "never" rule set reload policy |
protected static int |
RELOAD_RULESETS_PERIODICALLY
The code for the "periodically" rule set reload policy |
static java.lang.String |
RELOAD_RULESETS_PERIODICALLY_STRING
The code string for the "periodically" rule set reload policy |
protected static int |
RELOAD_RULESETS_WHEN_MODIFIED
The code for the "when modified" rule set reload policy |
static java.lang.String |
RELOAD_RULESETS_WHEN_MODIFIED_STRING
The code string for the "when modified" rule set reload policy |
static java.lang.String |
ROOT_CONTEXT_NAME
The name of the root jndi context |
static java.lang.String |
RULE_SET_DATA_HOME_NAME
The name of the rule set data bean home environment property |
static java.lang.String |
RULE_SET_RELOAD_INTERVAL
The name of the rule set reload interval environment property |
static java.lang.String |
RULE_SET_RELOAD_POLICY
The name of the rule set reload policy environment property |
static java.lang.String |
RULE_SHEET_DIRECTORY
The name of the rule sheet deployment directory environment property |
protected ServiceProviderManager |
serviceProviderManager
The service provider manager |
protected javax.ejb.SessionContext |
sessionContext
The ejb session context. |
static java.lang.String |
VENDOR_INDEPENDENT_MIME_TYPE
The name of the vendor independent mime type environment property |
Constructor Summary | |
RulesServiceBean()
Constructor |
Method Summary | |
java.util.Set |
applyRules(java.lang.String rulesetURI,
java.util.Set inputObjects,
java.util.Set outputObjectsTypeFilter,
java.util.Set outputObjectsCreatorFilter)
Applies a named set of rules to the set of objects provided by the caller in order to produce a resultant set of objects. |
void |
ejbActivate()
Activates |
void |
ejbCreate()
Creates |
void |
ejbPassivate()
Passivates |
void |
ejbRemove()
Removes TODO: 1. |
protected long |
getContextExpirationAge(int rulesetReloadPolicy,
long rulesetReloadInterval)
Gets the context expiration age which corresponds to a rule set reload policy and ruleset reload interval |
protected int |
getContextExpirationPolicy(int rulesetReloadPolicy)
Gets the context expiration policy which corresponds to a rule set reload policy |
protected long |
getContextExpirationUseCount(int rulesetReloadPolicy)
Gets the context expiration use count which corresponds to a rule set reload policy |
protected ContextWrapper |
getContextWrapper(java.lang.String rulesetURI)
Gets a context wrapper |
protected java.util.Map |
getMimeTypeHandlersMap(java.lang.String mimeTypeHandlersMapString)
Gets the mime type handlers map from a mime type handlers map string |
protected java.util.Map |
getMimeTypesMap(java.lang.String mimeTypesMapString)
Gets the mime types map from a mime types map string |
protected int |
getReloadPolicyCode(java.lang.String rulesetReloadPolicyString)
Gets the numeric code for the ruleset reload policy |
protected long |
getRulesetExpirationAge(int rulesetReloadPolicy,
long rulesetReloadInterval)
Gets the ruleset expiration age which corresponds to a rule set reload policy and ruleset reload interval |
protected int |
getRulesetExpirationPolicy(int rulesetReloadPolicy)
Gets the rule set expiration policy which corresponds to a rule set reload policy |
protected ContextWrapper |
getWrapperForContext(com.beasys.commerce.axiom.reasoning.rules.serviceProvider.Context context)
Gets a wrapper for the given context |
protected void |
performPoolMaintenance()
Performs pool maintenance |
protected boolean |
poolMaintenanceNeeded()
Determines if pool maintenance is needed |
void |
setSessionContext(javax.ejb.SessionContext sessionContext)
Sets the session context. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final long CONTEXT_POOL_ACCESS_LIMIT
public static final java.lang.String CONTEXT_POOL_MAX_SIZE
public static final int CONTEXT_WRAPPER_CACHE_CAPACITY
public static final java.lang.String EXCEPTION_MSG_DELIMITER
public static final java.lang.String MIME_TYPE_HANDLERS_MAP
public static final java.lang.String MIME_TYPES_MAP
public static final java.lang.String MIME_TYPE_MAP_DELIMITER
public static final java.lang.String MIME_TYPE_PAIR_DELIMITER
public static final float POOL_REDUCTION_FACTOR
public static final java.lang.String RELOAD_RULESETS_NEVER_STRING
public static final java.lang.String RELOAD_RULESETS_PERIODICALLY_STRING
public static final java.lang.String RELOAD_RULESETS_WHEN_MODIFIED_STRING
public static final java.lang.String ROOT_CONTEXT_NAME
public static final java.lang.String RULE_SET_DATA_HOME_NAME
public static final java.lang.String RULE_SET_RELOAD_INTERVAL
public static final java.lang.String RULE_SET_RELOAD_POLICY
public static final java.lang.String RULE_SHEET_DIRECTORY
public static final java.lang.String VENDOR_INDEPENDENT_MIME_TYPE
protected static final int RELOAD_RULESETS_NEVER
protected static final int RELOAD_RULESETS_PERIODICALLY
protected static final int RELOAD_RULESETS_WHEN_MODIFIED
protected long contextExpirationAge
protected int contextExpirationPolicy
protected long contextExpirationUseCount
protected com.beasys.commerce.axiom.reasoning.rules.service.RulesServiceBean.Stack contextWrapperCache
protected java.util.HashMap contextWrapperPool
protected long contextWrapperPoolAccessCount
protected int contextWrapperPoolMaxSize
protected boolean initialized
protected ServiceProviderManager serviceProviderManager
protected javax.ejb.SessionContext sessionContext
Constructor Detail |
public RulesServiceBean()
Method Detail |
public java.util.Set applyRules(java.lang.String rulesetURI, java.util.Set inputObjects, java.util.Set outputObjectsTypeFilter, java.util.Set outputObjectsCreatorFilter) throws java.lang.IllegalArgumentException, RulesServiceException
rulesetURI
- The uri of the rule set which contains the set of rules
that is to be applied.inputObjects
- The set of objects to which the rules are to be appliedoutputObjectsTypeFilter
- A set of class objects used to perform type-based
selection of the return objects.outputObjectsCreatorFilter
- A set of output object creator name strings
to be used to perform creator-name selection of the return objects after
type-based filtering has been performed.public void ejbActivate()
public void ejbCreate() throws javax.ejb.CreateException
public void ejbPassivate()
public void ejbRemove()
public void setSessionContext(javax.ejb.SessionContext sessionContext)
sessionContext
- The session contextprotected long getContextExpirationAge(int rulesetReloadPolicy, long rulesetReloadInterval) throws java.lang.IllegalArgumentException
rulesetReloadPolicy
- The ruleset reload policyrulesetReloadInterval
- The ruleset reload intervalprotected int getContextExpirationPolicy(int rulesetReloadPolicy) throws java.lang.IllegalArgumentException, RulesServiceException
rulesetReloadPolicy
- The ruleset reload policyprotected long getContextExpirationUseCount(int rulesetReloadPolicy) throws java.lang.IllegalArgumentException, RulesServiceException
rulesetReloadPolicy
- The ruleset reload policyprotected ContextWrapper getContextWrapper(java.lang.String rulesetURI) throws java.lang.IllegalArgumentException, RulesServiceException
rulesetURI
- The uri of the rule set for which the context wrapper
should be gottenprotected java.util.Map getMimeTypeHandlersMap(java.lang.String mimeTypeHandlersMapString) throws java.lang.IllegalArgumentException, RulesServiceException
mimeTypeHandlersMapString
- The string which contains the mime type
handlers mapprotected java.util.Map getMimeTypesMap(java.lang.String mimeTypesMapString) throws java.lang.IllegalArgumentException, RulesServiceException
mimeTypesMapString
- The string which contains the mime types mapprotected long getRulesetExpirationAge(int rulesetReloadPolicy, long rulesetReloadInterval) throws java.lang.IllegalArgumentException
rulesetReloadPolicy
- The ruleset reload policyrulesetReloadInterval
- The ruleset reload intervalprotected int getRulesetExpirationPolicy(int rulesetReloadPolicy) throws java.lang.IllegalArgumentException, RulesServiceException
rulesetReloadPolicy
- The ruleset reload policyprotected int getReloadPolicyCode(java.lang.String rulesetReloadPolicyString) throws java.lang.IllegalArgumentException, RulesServiceException
rulesetReloadPolicyString
- The string version of the codeprotected ContextWrapper getWrapperForContext(com.beasys.commerce.axiom.reasoning.rules.serviceProvider.Context context) throws java.lang.IllegalArgumentException
context
- The context to be wrappedprotected void performPoolMaintenance()
protected boolean poolMaintenanceNeeded()
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |