|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bluesock.bluemud.driver.Driver
The purpose of the driver is to wrap all of the system code, providing a single interface to the mudlib. The driver itself doesn't necessarily do very much work. It primarily delegates to various system components.
Constructor Summary | |
Driver()
|
Method Summary | |
(package private) static void |
|
static void |
addCallout(int secondsDelay,
MudEvent event)
Schedules a callout event. |
static void |
addEvent(MudEvent newEvent)
Add a MUD event to the event queue. |
static void |
addGroupedInstance(java.lang.String groupName,
MudObject instance)
|
static boolean |
addSecuredUser(java.lang.String username,
java.lang.String plaintextPassword)
|
static boolean |
authenticate(java.lang.String username,
java.lang.String plaintextPassword)
|
static boolean |
createDirectory(java.lang.String dirname)
Creates a directory on the filesystem. |
(package private) static void |
execute(java.lang.String filename)
|
static java.lang.String[] |
fstatFile(java.lang.String filename)
Provides fstats like information on a file and returns it blindly as a set of strings. |
static MudObject |
getActiveObject()
|
static User |
getActiveUser()
|
static MudObject |
getAliasedObject(java.lang.String alias,
boolean shared)
|
static java.lang.String |
getBluemudCodeRoot()
|
static java.lang.String |
getBluemudLogRoot()
|
static java.lang.String |
getBluemudRoot()
|
static java.lang.String |
getDriverStatistics()
Returns a string of a series of stats separated by \n that talk about the current state of the JVM and the engine. |
static MudObject[] |
getGroupedInstances(java.lang.String groupName)
|
(package private) static org.python.util.PythonInterpreter |
getInterpreter()
|
static MudObject |
getObject(int objectIdentifier)
|
static MudObject |
getObject(java.lang.String dottedPath)
|
static MudObject |
getObject(java.lang.String dottedPath,
boolean shared)
|
static MudObject |
getObject(java.lang.String dottedPath,
boolean shared,
boolean reload)
|
static java.lang.String |
getUptime()
This allows anyone (coders and non-coders) to know what the current uptime of the mud is. |
static java.lang.String |
getWorldDataRoot()
|
static java.lang.String |
getWorldDomainsRoot()
|
static java.lang.String |
getWorldHomeRoot()
|
static java.lang.String |
getWorldRoot()
|
static java.lang.String |
getWorldSecuredRoot()
|
static boolean |
hasSharedInstance(java.lang.String dottedPath)
|
static boolean |
isDirectory(java.lang.String filename)
Returns a boolean as to whether this file is a directory or not. |
static boolean |
isFile(java.lang.String filename)
Returns a boolean as to whether this file is a file or not. |
static java.lang.String[] |
listDirectory(java.lang.String dirname)
Returns the contents of a directory. |
static OID |
nextObjectID()
Serializes OIDs so that we don't repeat them ever. |
static java.lang.String |
readFile(java.lang.String filename)
Reads a file from the file system. |
static java.lang.String |
readFile(java.lang.String filename,
boolean cachethis)
Reads a file from the file system. |
static void |
registerAlias(java.lang.String alias,
java.lang.String dottedPath)
|
static boolean |
removeDirectory(java.lang.String dirname)
Removes a directory from the filesystem. |
static boolean |
removeFile(java.lang.String filename)
Removes a file off the file system. |
static void |
removeGroupedInstance(java.lang.String groupName,
MudObject instance)
|
static void |
removeObject(MudObject instance)
|
static boolean |
securedUserExists(java.lang.String username)
|
static void |
setActiveObject(MudObject o)
|
(package private) static void |
setActiveUser(User newActiveUser)
|
static void |
shutdown()
Shuts down the mud. |
static boolean |
touchFile(java.lang.String filename)
Touches a file on the filesystem updating it's last modified time. |
static boolean |
writeFile(java.lang.String content,
java.lang.String filename)
Checks permissions and then tells the FileManager to write the file to the filesystem. |
static boolean |
writeFile(java.lang.String content,
java.lang.String filename,
boolean append)
Checks permissions and then tells the FileManager to write the file to the filesystem. |
static void |
writeLogEntry(java.lang.String logName,
java.lang.String entry)
Throws something in the logs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Driver()
Method Detail |
static void()
public static OID nextObjectID()
public static void addEvent(MudEvent newEvent)
newEvent
- The event to add to the queue.public static void addCallout(int secondsDelay, MudEvent event)
secondsDelay
- How long from now the callout should happen.event
- The Mud event that executes at (or after) said time.public static MudObject getObject(java.lang.String dottedPath)
public static MudObject getObject(java.lang.String dottedPath, boolean shared)
public static MudObject getObject(java.lang.String dottedPath, boolean shared, boolean reload)
public static MudObject getObject(int objectIdentifier)
public static boolean hasSharedInstance(java.lang.String dottedPath)
public static MudObject getAliasedObject(java.lang.String alias, boolean shared)
public static void registerAlias(java.lang.String alias, java.lang.String dottedPath)
public static void addGroupedInstance(java.lang.String groupName, MudObject instance)
public static MudObject[] getGroupedInstances(java.lang.String groupName)
public static void removeGroupedInstance(java.lang.String groupName, MudObject instance)
public static void removeObject(MudObject instance)
public static boolean writeFile(java.lang.String content, java.lang.String filename)
content
- The file data.filename
- The name and path of the file.public static boolean writeFile(java.lang.String content, java.lang.String filename, boolean append)
content
- The file data.filename
- The name and path of the file.append
- Whether or not to append to the file if it
already exists.public static void writeLogEntry(java.lang.String logName, java.lang.String entry)
logName
- The log to toss the text in.entry
- The data to log.public static boolean touchFile(java.lang.String filename)
filename
- The name of the file to touch.public static java.lang.String readFile(java.lang.String filename, boolean cachethis)
filename
- The name of the file to read.cachethis
- Whether or not to cache the file in memory.public static java.lang.String readFile(java.lang.String filename)
filename
- The name of the file to read.public static java.lang.String[] fstatFile(java.lang.String filename)
filename
- The name of the file to fstat.public static java.lang.String[] listDirectory(java.lang.String dirname)
dirname
- The name of the directory to get a listing of.public static boolean isDirectory(java.lang.String filename)
filename
- The name of the file in question.public static boolean isFile(java.lang.String filename)
filename
- The name of the file in question.public static boolean removeFile(java.lang.String filename)
filename
- The name of the file to remove.public static boolean removeDirectory(java.lang.String dirname)
dirname
- The name of the directory to remove.public static boolean createDirectory(java.lang.String dirname)
dirname
- The name of the directory to create.public static MudObject getActiveObject()
public static void setActiveObject(MudObject o)
public static User getActiveUser()
public static java.lang.String getBluemudRoot()
public static java.lang.String getBluemudLogRoot()
public static java.lang.String getBluemudCodeRoot()
public static java.lang.String getWorldRoot()
public static java.lang.String getWorldDomainsRoot()
public static java.lang.String getWorldHomeRoot()
public static java.lang.String getWorldDataRoot()
public static java.lang.String getWorldSecuredRoot()
public static boolean authenticate(java.lang.String username, java.lang.String plaintextPassword)
public static boolean securedUserExists(java.lang.String username)
public static boolean addSecuredUser(java.lang.String username, java.lang.String plaintextPassword)
public static void shutdown()
public static java.lang.String getDriverStatistics()
public static java.lang.String getUptime()
static void setActiveUser(User newActiveUser)
static void execute(java.lang.String filename)
static org.python.util.PythonInterpreter getInterpreter()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |