public class Bot
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Bot.ActiveState |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_FILE |
static java.util.logging.Level |
DEFAULT_DEBUG_LEVEL |
static java.util.logging.Level |
FINE |
static java.util.logging.Level[] |
LEVELS |
static int |
MAX_CACHE |
static int |
MIN_CACHE |
Bot |
parent |
static int |
POOL_SIZE |
static java.lang.String |
PROGRAM |
static Bot |
systemCache |
static java.lang.String |
VERSION |
static java.util.logging.Level |
WARNING |
Constructor and Description |
---|
Bot() |
Modifier and Type | Method and Description |
---|---|
void |
addLogListener(LogListener listener) |
Avatar |
avatar()
Return the Avatar.
|
Awareness |
awareness()
Return the awareness.
|
static void |
clearPool() |
static Bot |
createInstance() |
static Bot |
createInstance(java.lang.String configFile,
java.lang.String memory,
boolean isSchema) |
static Bot |
createInstanceFromPool(java.lang.String instanceName,
boolean isSchema)
Return the cached instance from the pool if available, otherwise create a new instance.
|
static Bot |
fastCreateInstance(java.lang.String configFile,
java.lang.String memory,
boolean isSchema) |
static void |
forceShutdown(java.lang.String name)
Shutdown the pooled instance.
|
java.lang.String |
fullToString() |
java.util.logging.Level |
getDebugLevel()
Return the debugging level.
|
boolean |
getFilterProfanity() |
static java.util.concurrent.ConcurrentMap<java.lang.String,Bot> |
getInstances() |
java.util.logging.Logger |
getLog() |
java.util.Set<LogListener> |
getLogListeners() |
java.lang.String |
getName()
Return the instance's name.
|
Bot |
getParent() |
Bot.ActiveState |
getState() |
Stats |
getStats() |
static Bot |
getSystemCache() |
boolean |
isDebug() |
boolean |
isDebugFine() |
boolean |
isDebugFiner() |
boolean |
isDebugFinest() |
boolean |
isDebugSever() |
boolean |
isDebugWarning() |
void |
log(java.lang.Object source,
java.lang.String message,
java.util.logging.Level level,
java.lang.Object... arguments)
Log the message if the debug level is greater or equal to the level.
|
void |
log(java.lang.Object source,
java.lang.Throwable error)
Log the exception.
|
Memory |
memory()
Return the memory.
|
Mind |
mind()
Return the mind.
|
Mood |
mood()
Return the mood.
|
void |
pool()
Return the instance to the pool, or shutdown if too many instances pooled.
|
void |
removeLogListener(LogListener listener) |
void |
setAvatar(Avatar avatar)
Set the Avatar.
|
void |
setAwareness(Awareness awareness)
Set the awareness.
|
void |
setDebugLevel(java.util.logging.Level level)
Set the debugging level.
|
void |
setFilterProfanity(boolean filterProfanity) |
void |
setLog(java.util.logging.Logger log) |
void |
setLogListeners(java.util.Set<LogListener> logListeners) |
void |
setMemory(Memory memory)
Set the memory.
|
void |
setMind(Mind mind)
Set the mind.
|
void |
setMood(Mood mood)
Set the mood.
|
void |
setName(java.lang.String name)
Set the instance's name.
|
void |
setParent(Bot parent) |
void |
setState(Bot.ActiveState state) |
void |
setStats(Stats stats) |
static void |
setSystemCache(Bot systemCache) |
void |
shutdown()
Shutdown the system gracefully, persist memory and terminate thoughts.
|
void |
stat(java.lang.String stat)
Raise the statistic event.
|
java.lang.String |
toString() |
public static java.lang.String PROGRAM
public static java.lang.String VERSION
public static final java.util.logging.Level FINE
public static final java.util.logging.Level WARNING
public static java.util.logging.Level DEFAULT_DEBUG_LEVEL
public static final java.util.logging.Level[] LEVELS
public static java.lang.String CONFIG_FILE
public static int MAX_CACHE
public static int MIN_CACHE
public static int POOL_SIZE
public static Bot systemCache
public Bot parent
public static Bot getSystemCache()
public static void setSystemCache(Bot systemCache)
public static Bot createInstance()
public static Bot createInstance(java.lang.String configFile, java.lang.String memory, boolean isSchema)
public static Bot fastCreateInstance(java.lang.String configFile, java.lang.String memory, boolean isSchema)
public static Bot createInstanceFromPool(java.lang.String instanceName, boolean isSchema)
public void stat(java.lang.String stat)
public Stats getStats()
public void setStats(Stats stats)
public Bot.ActiveState getState()
public void setState(Bot.ActiveState state)
public Bot getParent()
public void setParent(Bot parent)
public boolean getFilterProfanity()
public void setFilterProfanity(boolean filterProfanity)
public java.util.logging.Level getDebugLevel()
public boolean isDebug()
public boolean isDebugFine()
public boolean isDebugFiner()
public boolean isDebugFinest()
public boolean isDebugWarning()
public boolean isDebugSever()
public void log(java.lang.Object source, java.lang.String message, java.util.logging.Level level, java.lang.Object... arguments)
public void log(java.lang.Object source, java.lang.Throwable error)
public void setDebugLevel(java.util.logging.Level level)
public Awareness awareness()
public void setAwareness(Awareness awareness)
public Mind mind()
public Mood mood()
public Avatar avatar()
public void setMind(Mind mind)
public void setMood(Mood mood)
public void setAvatar(Avatar avatar)
public Memory memory()
public void setMemory(Memory memory)
public void shutdown()
public static void forceShutdown(java.lang.String name)
public static void clearPool()
public void pool()
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String fullToString()
public void addLogListener(LogListener listener)
public void removeLogListener(LogListener listener)
public java.util.Set<LogListener> getLogListeners()
public void setLogListeners(java.util.Set<LogListener> logListeners)
public static java.util.concurrent.ConcurrentMap<java.lang.String,Bot> getInstances()
public java.util.logging.Logger getLog()
public void setLog(java.util.logging.Logger log)