org.aitools.programd.server
Class BotAccess

java.lang.Object
  extended by org.aitools.programd.server.BotAccess

public class BotAccess
extends java.lang.Object

This is an object that provides an interface to a Program D bot to be used from a server context such as a JSP page.

Author:
Noel Bush

Field Summary
protected  java.lang.String botid
           
protected  Core core
           
protected  java.lang.String userid
           
 
Constructor Summary
BotAccess(Core coreToUse, java.lang.String bot, java.lang.String user)
          Creates a new Bot with the given core, bot id and user id.
 
Method Summary
 Bot getBot()
           
 java.lang.String getBotId()
           
 java.lang.String getResponse(java.lang.String input)
          Returns a response to the given input, for the assigned botid and userid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

core

protected Core core

botid

protected java.lang.String botid

userid

protected java.lang.String userid
Constructor Detail

BotAccess

public BotAccess(Core coreToUse,
                 java.lang.String bot,
                 java.lang.String user)
Creates a new Bot with the given core, bot id and user id.

Parameters:
coreToUse -
bot - the id of the bot
user - the id of the user
Method Detail

getResponse

public java.lang.String getResponse(java.lang.String input)
Returns a response to the given input, for the assigned botid and userid.

Parameters:
input - the user input
Returns:
the response to the input

getBotId

public java.lang.String getBotId()
Returns:
the botid

getBot

public Bot getBot()
Returns:
the underlying bot object