javax.rules
Interface RuleSession

All Known Subinterfaces:
StatefulRuleSession, StatelessRuleSession

public interface RuleSession

This interface is a representation of a client session with a rules engine. A rules engine session serves as an entry point into an underlying rules engine. The RuleSession is bound to a rules engine instance and exposes a vendor-neutral rule processing API for executing Rule(s) within a bound RuleExecutionSet.

Note: the release method must be called to clean up all resources used by the RuleSession. Calling release may make the RuleSession eligible to be returned to a RuleSession pool.

See Also:
RuleRuntime, RuleExecutionSet, Rule

Method Summary
 RuleExecutionSetMetadata getRuleExecutionSetMetadata()
          Returns the meta data for the rule execution set bound to this rule session.
 int getType()
          Returns the type identifier for this RuleSession.
 void release()
          Releases all resources used by this rule session.
 

Method Detail

getRuleExecutionSetMetadata

public RuleExecutionSetMetadata getRuleExecutionSetMetadata()
                                                     throws InvalidRuleSessionException,
                                                            java.rmi.RemoteException
Returns the meta data for the rule execution set bound to this rule session.

Returns:
the RuleExecutionSetMetaData bound to this rule session.
Throws:
InvalidRuleSessionException - on illegal rule session state.@throws javax.rules.InvalidRuleSessionException
java.rmi.RemoteException

release

public void release()
             throws java.rmi.RemoteException,
                    InvalidRuleSessionException
Releases all resources used by this rule session. This method renders this rule session unusable until it is reacquired through the RuleRuntime.

Throws:
InvalidRuleSessionException - on illegal rule session state.
InvalidRuleSessionException
java.rmi.RemoteException

getType

public int getType()
            throws java.rmi.RemoteException,
                   InvalidRuleSessionException
Returns the type identifier for this RuleSession. The type identifiers are defined in the RuleRuntime interface.

Returns:
int
Throws:
InvalidRuleSessionException - on illegal rule session state.
InvalidRuleSessionException
java.rmi.RemoteException
See Also:
RuleRuntime


Copyright © 2004 Java Community Process. All Rights Reserved.