All Packages Class Hierarchy This Package Previous Next Index
Class key.Key
java.lang.Object
|
+----key.Atom
|
+----key.Container
|
+----key.Scape
|
+----key.Key
- public class Key
- extends Scape
This class is a little badly behaved, as far as containers
go. It starts out life as a normal container, so it can
get its defaults loaded in. These are other containers, such
as 'players' and 'groups'.
Once these are in place, it switches to being a reference
container, meaning that everything *else* that is placed in here
is just a reference to something else.
This would be a problem, except that this class is never
stored anywhere, it is generated everytime at bootup by
its constructor.
-
bootStatisticsProperty
-
-
clans
-
-
clansFile
-
-
commandSets
-
-
commandSetsFile
-
-
config
-
-
configBasePath
-
-
configFile
-
-
copyright
-
-
daemons
-
-
daemonsFile
-
-
DEFAULT_PORT
-
-
groups
-
-
groupsFile
-
-
landscapeFile
-
-
latencyCache
-
-
locations
-
-
loginStatisticsProperty
-
-
logProperty
-
-
logsBasePath
-
-
nullEntry
-
-
nullString
-
-
online
-
-
onlineFile
-
-
reference
-
-
RELEASE
- Major release number
-
residents
-
-
residentsBasePath
-
-
residentsFile
-
-
scheduler
-
-
shortcuts
-
-
sinceBootLoginStatisticsProperty
-
-
sites
-
-
sitesFile
-
-
tempFileExtension
-
-
unlinkedString
-
-
verbose
- This is a global variable that can be used
by any command to indicate that _everything_
on the program should start doing verbose
logging.
-
VERSION
- Minor version.
-
voidRoom
-
-
Key()
-
-
Key(boolean)
-
-
addEverything()
-
-
addShortcuts()
-
-
addTopLevel(Container)
- Adds all the symbols in this
container to the provided Container
This container retains a reference to
its elements, but full ownership (the
elements parents) is given to the new
container.
-
bootLog(String)
- A special type of log call which sends the output to the
boot log (if available), but will also always send the
message to System.err
-
confirmedDirectory(String)
-
-
confirmedFile(File, String)
-
-
debug(Object, String)
- A generalised debugging log function
-
debug(String, String)
- Use for static routines only, please
-
evalReadOnlyProperty(ReadOnlyProperty)
- override to return the correct value for the supplied property
make sure you call super.evalReadOnlyProperty if you don't
understand it before returning null
-
fatal(Object, String)
- A generalised fatal error message
-
getClans()
-
-
getConfig()
-
-
getConnectRoom(Player)
-
-
getId()
-
-
getInitialRank()
-
-
getInternet()
-
-
getLandscape(String)
- Returns the landscape referenced by the supplied
id.
-
getLatencyCache()
-
-
getOnline()
-
-
getParentId()
- see Parent.java
-
getResidents()
-
-
getScheduler()
-
-
instance()
- The easiest way to get the top level
object in the running system.
-
isGenesis()
-
-
isRunning()
-
-
linkPlayer(Player)
- overrides default so that timeStatistics can be updated
-
loadClans()
-
-
loadCommandSets()
-
-
loadConfig()
-
-
loadConfiguration()
-
-
loadDaemons()
-
-
loadEverything()
-
-
loadFrom(DataInput)
-
-
loadGroups()
-
-
loadLandscape()
- (Re)loads the system locations from disk.
-
loadObject(DataInput)
-
-
loadObject(File)
-
-
loadOnline()
-
-
loadResidents()
-
-
loadSites()
-
-
log(String, String)
- A log routine which will send the message to the
supplied log file, if available, or System.out
otherwise.
-
main(String[])
-
-
resolveEverything()
-
-
setupFiles()
-
-
shortcuts()
-
-
shutdown()
- This routine is only _ever_ meant to be called from
the scheduler.
-
startDaemons()
-
-
storeObject(Storable, DataOutput)
-
-
storeObject(Storable, File)
-
-
sync()
- Updates the system disk files so that
the changes to non-saved objects will
be saved.
-
syncConfig()
-
-
unlinkPlayer(Player)
- overrides default so that timeStatistics can be updated
-
writeTo(DataOutput)
-
DEFAULT_PORT
protected static final int DEFAULT_PORT
RELEASE
protected static final int RELEASE
- Major release number
VERSION
protected static final int VERSION
- Minor version. Eg: Version release.version
latencyCache
protected LatentCache latencyCache
scheduler
protected Scheduler scheduler
reference
protected static Key reference
voidRoom
protected Room voidRoom
residentsBasePath
protected File residentsBasePath
configBasePath
protected File configBasePath
logsBasePath
protected File logsBasePath
landscapeFile
protected File landscapeFile
locations
protected Landscape locations
commandSetsFile
protected File commandSetsFile
commandSets
protected Container commandSets
groupsFile
protected File groupsFile
groups
protected Container groups
clansFile
protected File clansFile
clans
protected Container clans
configFile
protected File configFile
config
protected BaseConfiguration config
sitesFile
protected File sitesFile
sites
protected Internet sites
daemonsFile
protected File daemonsFile
daemons
protected Daemons daemons
residentsFile
protected File residentsFile
residents
protected Residents residents
onlineFile
protected File onlineFile
online
protected Container online
shortcuts
protected Shortcuts shortcuts
loginStatisticsProperty
protected AtomicProperty loginStatisticsProperty
sinceBootLoginStatisticsProperty
protected AtomicProperty sinceBootLoginStatisticsProperty
bootStatisticsProperty
protected AtomicProperty bootStatisticsProperty
logProperty
protected AtomicProperty logProperty
nullString
public static final String nullString
unlinkedString
public static final String unlinkedString
nullEntry
public static final String nullEntry
tempFileExtension
public static final String tempFileExtension
verbose
public static boolean verbose
- This is a global variable that can be used
by any command to indicate that _everything_
on the program should start doing verbose
logging. At any given point in time, there
should be only _one_ section of code that
can turn this flag on.
copyright
public static final String copyright
Key
protected Key(boolean c)
Key
protected Key()
instance
public static Key instance()
- The easiest way to get the top level
object in the running system.
isRunning
public boolean isRunning()
loadEverything
protected void loadEverything()
addEverything
protected void addEverything() throws NonUniqueKeyException, BadKeyException
addShortcuts
protected void addShortcuts() throws NonUniqueKeyException, BadKeyException
resolveEverything
protected void resolveEverything()
startDaemons
protected void startDaemons()
setupFiles
protected void setupFiles()
getLandscape
public Landscape getLandscape(String match)
- Returns the landscape referenced by the supplied
id. eg 'realm.hill.top'
getInitialRank
public Rank getInitialRank()
getConnectRoom
public Room getConnectRoom(Player p)
getOnline
public Container getOnline()
getClans
public Container getClans()
getConfig
public BaseConfiguration getConfig()
linkPlayer
public void linkPlayer(Player p) throws NonUniqueKeyException, BadKeyException
- overrides default so that timeStatistics can be updated
- Overrides:
- linkPlayer in class Scape
unlinkPlayer
public void unlinkPlayer(Player p) throws NonUniqueKeyException, BadKeyException
- overrides default so that timeStatistics can be updated
- Overrides:
- unlinkPlayer in class Scape
addTopLevel
public void addTopLevel(Container addTo)
- Adds all the symbols in this
container to the provided Container
This container retains a reference to
its elements, but full ownership (the
elements parents) is given to the new
container.
- Overrides:
- addTopLevel in class Container
evalReadOnlyProperty
public Object evalReadOnlyProperty(ReadOnlyProperty p)
- override to return the correct value for the supplied property
make sure you call super.evalReadOnlyProperty if you don't
understand it before returning null
- Overrides:
- evalReadOnlyProperty in class Scape
debug
public static final void debug(Object from,
String message)
- A generalised debugging log function
- Parameters:
- message - The message to store
debug
public static final void debug(String name,
String message)
- Use for static routines only, please
fatal
public static void fatal(Object from,
String message)
- A generalised fatal error message
getId
public String getId()
- Overrides:
- getId in class Atom
getParentId
public String getParentId()
- see Parent.java
- Overrides:
- getParentId in class Container
shutdown
public synchronized void shutdown()
- This routine is only _ever_ meant to be called from
the scheduler.
getLatencyCache
public static final LatentCache getLatencyCache()
getScheduler
public static final Scheduler getScheduler()
getInternet
public static final Internet getInternet()
shortcuts
public static final Container shortcuts()
isGenesis
public boolean isGenesis()
sync
public synchronized void sync()
- Updates the system disk files so that
the changes to non-saved objects will
be saved. (eg, which commands are
where, etc)
- Overrides:
- sync in class Atom
getResidents
public Residents getResidents()
loadConfig
protected synchronized void loadConfig()
syncConfig
public synchronized void syncConfig()
loadCommandSets
protected synchronized void loadCommandSets()
loadGroups
protected synchronized void loadGroups()
loadClans
protected synchronized void loadClans()
loadConfiguration
protected synchronized void loadConfiguration()
loadSites
protected synchronized void loadSites()
loadOnline
protected synchronized void loadOnline()
loadDaemons
protected synchronized void loadDaemons()
loadResidents
protected synchronized void loadResidents()
loadLandscape
protected synchronized void loadLandscape()
- (Re)loads the system locations from disk. This
command obviously overwrites any that are in
memory & loads the new ones from disk. There
should be no need to call this more than once,
however, since the only Right and True [tm]
way to modify these is online.
storeObject
public static void storeObject(Storable object,
File to)
loadObject
public static Storable loadObject(File from)
loadObject
public static Storable loadObject(DataInput ds) throws ClassNotFoundException, IOException, ClassNotStorableException, InstantiationException, IllegalAccessException
storeObject
public static void storeObject(Storable object,
DataOutput ds) throws IOException
confirmedFile
public File confirmedFile(File basePath,
String name)
confirmedDirectory
public File confirmedDirectory(String path)
loadFrom
public final void loadFrom(DataInput from) throws IOException
- Overrides:
- loadFrom in class Container
writeTo
public void writeTo(DataOutput to) throws IOException
- Overrides:
- writeTo in class Container
main
public static void main(String args[])
bootLog
public static final void bootLog(String message)
- A special type of log call which sends the output to the
boot log (if available), but will also always send the
message to System.err
log
public static void log(String logKey,
String message)
- A log routine which will send the message to the
supplied log file, if available, or System.out
otherwise.
All Packages Class Hierarchy This Package Previous Next Index