001 package com.hammurapi.reasoning;
002
003 /**
004 * Inference listener receives notifications
005 * of knowledge base modifications.
006 * @author Pavel Vlasov
007 *
008 */
009 public interface InferenceListener<F> {
010
011 /**
012 * Invoked when an object is added to the knowledge base.
013 * @param obj
014 */
015 void onPut(F obj, Handle<F> handle);
016
017 /**
018 * Invoked when an object is removed from the knowledge base.
019 * @param obj
020 */
021 void onRemove(F obj, Handle<F> handle);
022 }