|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pandora.Pandora
public class Pandora
This class represents the identity of Pandora, and controls module registration, startup and shutdown. It defines a singleton that represents the system.
Field Summary | |
---|---|
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 |
POOL_SIZE
|
static java.util.logging.Level |
WARNING
|
Constructor Summary | |
---|---|
Pandora()
|
Method Summary | |
---|---|
void |
addLogListener(LogListener listener)
|
Avatar |
avatar()
Return the Avatar. |
Awareness |
awareness()
Return the awareness. |
static Pandora |
createInstance()
|
static Pandora |
createInstance(java.lang.String configFile,
java.lang.String memory)
|
static Pandora |
createInstanceFromPool(java.lang.String instanceName)
Return the cached instance from the pool if available, otherwise create a new instance. |
java.util.logging.Level |
getDebugLevel()
Return the debugging level. |
boolean |
getFilterProfanity()
|
static java.util.concurrent.ConcurrentMap<java.lang.String,Pandora> |
getInstances()
|
java.util.logging.Logger |
getLog()
|
java.util.Set<LogListener> |
getLogListeners()
|
java.lang.String |
getName()
Return the instances name. |
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 |
shutdown()
Shutdown the system gracefully, persist memory and terminate thoughts. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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 POOL_SIZE
Constructor Detail |
---|
public Pandora()
Method Detail |
---|
public static Pandora createInstance()
public static Pandora createInstance(java.lang.String configFile, java.lang.String memory)
public static Pandora createInstanceFromPool(java.lang.String instanceName)
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 void pool()
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
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,Pandora> getInstances()
public java.util.logging.Logger getLog()
public void setLog(java.util.logging.Logger log)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |