brahms.communication.util
Class ExceptionGenerator

java.lang.Object
  extended by brahms.communication.util.ExceptionGenerator

public class ExceptionGenerator
extends java.lang.Object

The ExceptionGenerator generates Exception conceptual objects and Exception beliefs to be asserted to the belief set of an agent or object when an exception has occurred of which an agent should be made aware so that it can recover appropriately from that exception.

Version:
$Revision: 1.1 $ $Date: 2007/10/10 14:03:01 $ $Author: rvhoof $
Author:
Ron van Hoof

Constructor Summary
ExceptionGenerator()
           
 
Method Summary
static ExceptionRecord generateException(IActiveInstance agent, java.lang.String type, java.lang.String message, IContext ctx)
          Generates a brahms.base.Exception object and the appropriate statements for the specified agent that the exception was thrown, the type of exception and the exception message if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionGenerator

public ExceptionGenerator()
Method Detail

generateException

public static final ExceptionRecord generateException(IActiveInstance agent,
                                                      java.lang.String type,
                                                      java.lang.String message,
                                                      IContext ctx)
Generates a brahms.base.Exception object and the appropriate statements for the specified agent that the exception was thrown, the type of exception and the exception message if any.

Parameters:
agent - the active instance for which the exception is thrown
type - the type of exception thrown
message - the exception message
ctx - the context in which the exception is generated
Returns:
ExceptionRecord a record of the exception to include the Exception object and a set of beliefs with the specified info to be asserted as beliefs in an agent's belief set.


Copyright © 1997-2012 All Rights Reserved.