MAIN_HOST, TIME_SAVETHREAD_SLEEP, TIME_UTILTHREAD_SLEEP| Constructor | Description |
|---|---|
MUD(java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
acceptConnection(java.net.Socket sock) |
Handles a connection from a user, and internal states
|
static int |
activeThreadCount(java.lang.ThreadGroup tGroup,
boolean nonDaemonsOnly) |
|
static void |
defaultShutdown() |
|
static void |
execExternalRestart(java.lang.String command) |
|
java.lang.String |
executeCommand(java.lang.String cmd) |
Flexible interface for tinkering with mud-host settings.
|
java.lang.String |
getHost() |
the hostname of the mud server
|
java.lang.String |
getLanguage() |
Return the viewable name of the language supported by this host.
|
java.util.List<java.lang.Runnable> |
getOverdueThreads() |
Return any internal threads that are a source of troubles
|
int |
getPort() |
the port a given MUD server instance is listening on
|
java.lang.String |
getStatus() |
Retrieve a string telling the status of mud startup or shutdown
|
long |
getUptimeSecs() |
Retrieve the number of seconds since startup
|
java.lang.String |
geWebHostUrl() |
The hostname, port of the most public web server for this host
Includes trailing slash
|
static void |
globalShutdown(Session S,
boolean keepItDown,
java.lang.String externalCommand) |
|
void |
interrupt() |
|
boolean |
isAcceptingConnections() |
Sets whether this mud is accepting connections
|
static void |
main(java.lang.String[] a) |
|
void |
run() |
|
void |
setAcceptConnections(boolean truefalse) |
Sets whether this mud is accepting connections
|
void |
setState(com.planet_ink.coffee_mud.application.MUD.MudState st) |
|
void |
shutdown(Session S,
boolean keepItDown,
java.lang.String externalCommand) |
An order to permanently shutdown the entire mud system
|
java.lang.ThreadGroup |
threadGroup() |
Because thread groups are used to track configurations,
here is a way to get it.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic void acceptConnection(java.net.Socket sock)
throws java.net.SocketException,
java.io.IOException
MudHostacceptConnection in interface MudHostsock - the socket the connection was made onjava.net.SocketException - socket exceptionsjava.io.IOException - io exceptionspublic java.lang.ThreadGroup threadGroup()
MudHostthreadGroup in interface MudHostpublic java.lang.String getLanguage()
MudHostgetLanguage in interface MudHostpublic void setState(com.planet_ink.coffee_mud.application.MUD.MudState st)
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic java.lang.String getStatus()
MudHostpublic void shutdown(Session S, boolean keepItDown, java.lang.String externalCommand)
MudHostpublic static void defaultShutdown()
public static void globalShutdown(Session S, boolean keepItDown, java.lang.String externalCommand)
public void interrupt()
interrupt in class java.lang.Threadpublic static int activeThreadCount(java.lang.ThreadGroup tGroup,
boolean nonDaemonsOnly)
public java.lang.String getHost()
MudHostpublic int getPort()
MudHostpublic java.lang.String geWebHostUrl()
MudHostgeWebHostUrl in interface MudHostpublic java.util.List<java.lang.Runnable> getOverdueThreads()
MudHostgetOverdueThreads in interface MudHostpublic static void main(java.lang.String[] a)
public static void execExternalRestart(java.lang.String command)
public void setAcceptConnections(boolean truefalse)
MudHostsetAcceptConnections in interface MudHosttruefalse - whether it is accepting connectionsMudHost.isAcceptingConnections()public boolean isAcceptingConnections()
MudHostisAcceptingConnections in interface MudHostMudHost.setAcceptConnections(boolean)public long getUptimeSecs()
MudHostgetUptimeSecs in interface MudHostpublic java.lang.String executeCommand(java.lang.String cmd)
throws java.lang.Exception
MudHostexecuteCommand in interface MudHostcmd - space-delimited (parsable) command/parm listjava.lang.Exception - any exceptions