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, wait
activeCount, 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, yield
public void acceptConnection(java.net.Socket sock) throws java.net.SocketException, java.io.IOException
MudHost
acceptConnection
in interface MudHost
sock
- the socket the connection was made onjava.net.SocketException
- socket exceptionsjava.io.IOException
- io exceptionspublic java.lang.ThreadGroup threadGroup()
MudHost
threadGroup
in interface MudHost
public java.lang.String getLanguage()
MudHost
getLanguage
in interface MudHost
public void setState(com.planet_ink.coffee_mud.application.MUD.MudState st)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.String getStatus()
MudHost
public void shutdown(Session S, boolean keepItDown, java.lang.String externalCommand)
MudHost
public static void defaultShutdown()
public static void globalShutdown(Session S, boolean keepItDown, java.lang.String externalCommand)
public void interrupt()
interrupt
in class java.lang.Thread
public static int activeThreadCount(java.lang.ThreadGroup tGroup, boolean nonDaemonsOnly)
public java.lang.String getHost()
MudHost
public int getPort()
MudHost
public java.lang.String geWebHostUrl()
MudHost
geWebHostUrl
in interface MudHost
public java.util.List<java.lang.Runnable> getOverdueThreads()
MudHost
getOverdueThreads
in interface MudHost
public static void main(java.lang.String[] a)
public static void execExternalRestart(java.lang.String command)
public void setAcceptConnections(boolean truefalse)
MudHost
setAcceptConnections
in interface MudHost
truefalse
- whether it is accepting connectionsMudHost.isAcceptingConnections()
public boolean isAcceptingConnections()
MudHost
isAcceptingConnections
in interface MudHost
MudHost.setAcceptConnections(boolean)
public long getUptimeSecs()
MudHost
getUptimeSecs
in interface MudHost
public java.lang.String executeCommand(java.lang.String cmd) throws java.lang.Exception
MudHost
executeCommand
in interface MudHost
cmd
- space-delimited (parsable) command/parm listjava.lang.Exception
- any exceptions