001 package com.hammurapi.reasoning;
002
003 /**
004 * Base reasoning session interface.
005 * @author Pavel
006 */
007 public interface ReasoningSession {
008
009 /**
010 * Closes the session and releases resources held by the session.
011 * @throws ReasoningException
012 */
013 void close() throws ReasoningException;
014
015 /**
016 * Resets session state.
017 * @throws ReasoningException
018 */
019 void reset() throws ReasoningException;
020
021 /**
022 * Metadata method.
023 * @return Session name.
024 */
025 String getName();
026
027 /**
028 * Metadata method.
029 * @return Session description.
030 */
031 String getDescription();
032
033 /**
034 * Sets exception handler.
035 * @param handler
036 * @throws ReasoningException
037 */
038 void setExceptionHandler(ExceptionHandler handler) throws ReasoningException;
039
040 /**
041 * @return Exception listener set for this session.
042 * @throws ReasoningException
043 */
044 ExceptionHandler getExceptionHandler() throws ReasoningException;
045 }