C# Class Universe.Simulation.Base.MinimalSimulationBase

Inheritance: ISimulationBase
ファイルを表示 Open project: Virtual-Universe/Virtual-Universe

Protected Properties

Property Type Description
m_BaseHTTPServer IHttpServer
m_Port uint
m_Servers IHttpServer>.Dictionary
m_StartupTime System.DateTime
m_TimerScriptFileName string
m_TimerScriptTime int
m_TimerScriptTimer System.Timers.Timer
m_applicationRegistry IRegistryCore
m_commandLineParameters string[]
m_config IConfigSource
m_configurationLoader Universe.Framework.Configuration.ConfigurationLoader
m_consolePrompt string
m_dataPlugins List
m_defaultDataPath string
m_eventManager Universe.Framework.Services.ClassHelpers.Other.UniverseEventManager
m_mapcenter_x int
m_mapcenter_y int
m_original_config IConfigSource
m_pidFile string
m_servicePlugins List
m_shutdownCommandsFile string
m_startupCommandsFile string
m_version string

Public Methods

Method Description
CloseModules ( ) : void

Close all the Application Plugins

Configuration ( IConfigSource configSource ) : void

Read the configuration

Copy ( ) : ISimulationBase
GetHttpServer ( uint port ) : IHttpServer

Get an HTTPServer on the given port. It will create one if one does not exist

HandleConfigRefresh ( IScene scene, string cmd ) : void
HandleForceGC ( IScene scene, string cmd ) : void
HandleShowInfo ( IScene scene, string cmd ) : void
HandleShowVersion ( IScene scene, string cmd ) : void
HandleTimerScriptTime ( IScene scene, string cmd ) : void
Initialize ( IConfigSource originalConfig, IConfigSource configSource, string cmdParams, ConfigurationLoader configLoader ) : void

Do the initial setup for the application

InitializeModules ( ) : void
MinimalSimulationBase ( string consolePrompt, List dataPlugins, List servicePlugins ) : System
RegisterConsoleCommands ( ) : void

Register standard set of region console commands

Run ( ) : void

Run the console now that we are all done with startup

RunCommandScript ( string fileName ) : void

Run an optional startup list of commands

RunStartupCommands ( ) : void

Run the commands given now that startup is complete

Shutdown ( bool close ) : void

Should be overridden and referenced by descendents if they need to perform extra shutdown processing Performs any last-minute sanity checking and shuts down the region server

Startup ( ) : void

Performs initialization of the application, such as loading the HTTP server and modules

runConfig ( IScene scene, string cmd ) : void

Protected Methods

Method Description
CreatePIDFile ( string path ) : void

Write the PID file to the hard drive

HandleQuit ( IScene scene, string args ) : void
PrintFileToConsole ( string fileName ) : void

Opens a file and uses it as input to the console command parser.

RemovePIDFile ( ) : void

Delete the PID file now that we are done running

RunAutoTimerScript ( object sender, EventArgs e ) : void

Timer to run a specific text file as console commands. Configured in in the main .ini file

Method Details

CloseModules() public method

Close all the Application Plugins
public CloseModules ( ) : void
return void

Configuration() public method

Read the configuration
public Configuration ( IConfigSource configSource ) : void
configSource IConfigSource
return void

Copy() public method

public Copy ( ) : ISimulationBase
return ISimulationBase

CreatePIDFile() protected method

Write the PID file to the hard drive
protected CreatePIDFile ( string path ) : void
path string
return void

GetHttpServer() public method

Get an HTTPServer on the given port. It will create one if one does not exist
public GetHttpServer ( uint port ) : IHttpServer
port uint
return IHttpServer

HandleConfigRefresh() public method

public HandleConfigRefresh ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

HandleForceGC() public method

public HandleForceGC ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

HandleQuit() protected method

protected HandleQuit ( IScene scene, string args ) : void
scene IScene
args string
return void

HandleShowInfo() public method

public HandleShowInfo ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

HandleShowVersion() public method

public HandleShowVersion ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

HandleTimerScriptTime() public method

public HandleTimerScriptTime ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

Initialize() public method

Do the initial setup for the application
public Initialize ( IConfigSource originalConfig, IConfigSource configSource, string cmdParams, ConfigurationLoader configLoader ) : void
originalConfig IConfigSource
configSource IConfigSource
cmdParams string
configLoader Universe.Framework.Configuration.ConfigurationLoader
return void

InitializeModules() public method

public InitializeModules ( ) : void
return void

MinimalSimulationBase() public method

public MinimalSimulationBase ( string consolePrompt, List dataPlugins, List servicePlugins ) : System
consolePrompt string
dataPlugins List
servicePlugins List
return System

PrintFileToConsole() protected method

Opens a file and uses it as input to the console command parser.
protected PrintFileToConsole ( string fileName ) : void
fileName string name of file to use as input to the console
return void

RegisterConsoleCommands() public method

Register standard set of region console commands
public RegisterConsoleCommands ( ) : void
return void

RemovePIDFile() protected method

Delete the PID file now that we are done running
protected RemovePIDFile ( ) : void
return void

Run() public method

Run the console now that we are all done with startup
public Run ( ) : void
return void

RunAutoTimerScript() protected method

Timer to run a specific text file as console commands. Configured in in the main .ini file
protected RunAutoTimerScript ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

RunCommandScript() public method

Run an optional startup list of commands
public RunCommandScript ( string fileName ) : void
fileName string
return void

RunStartupCommands() public method

Run the commands given now that startup is complete
public RunStartupCommands ( ) : void
return void

Shutdown() public method

Should be overridden and referenced by descendents if they need to perform extra shutdown processing Performs any last-minute sanity checking and shuts down the region server
public Shutdown ( bool close ) : void
close bool
return void

Startup() public method

Performs initialization of the application, such as loading the HTTP server and modules
public Startup ( ) : void
return void

runConfig() public method

public runConfig ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

Property Details

m_BaseHTTPServer protected_oe property

protected IHttpServer m_BaseHTTPServer
return IHttpServer

m_Port protected_oe property

protected uint m_Port
return uint

m_Servers protected_oe property

protected Dictionary m_Servers
return IHttpServer>.Dictionary

m_StartupTime protected_oe property

Time at which this server was started
protected DateTime,System m_StartupTime
return System.DateTime

m_TimerScriptFileName protected_oe property

protected string m_TimerScriptFileName
return string

m_TimerScriptTime protected_oe property

protected int m_TimerScriptTime
return int

m_TimerScriptTimer protected_oe property

protected Timer,System.Timers m_TimerScriptTimer
return System.Timers.Timer

m_applicationRegistry protected_oe property

protected IRegistryCore m_applicationRegistry
return IRegistryCore

m_commandLineParameters protected_oe property

protected string[] m_commandLineParameters
return string[]

m_config protected_oe property

protected IConfigSource m_config
return IConfigSource

m_configurationLoader protected_oe property

protected ConfigurationLoader,Universe.Framework.Configuration m_configurationLoader
return Universe.Framework.Configuration.ConfigurationLoader

m_consolePrompt protected_oe property

protected string m_consolePrompt
return string

m_dataPlugins protected_oe property

protected List m_dataPlugins
return List

m_defaultDataPath protected_oe property

protected string m_defaultDataPath
return string

m_eventManager protected_oe property

protected UniverseEventManager,Universe.Framework.Services.ClassHelpers.Other m_eventManager
return Universe.Framework.Services.ClassHelpers.Other.UniverseEventManager

m_mapcenter_x protected_oe property

protected int m_mapcenter_x
return int

m_mapcenter_y protected_oe property

protected int m_mapcenter_y
return int

m_original_config protected_oe property

protected IConfigSource m_original_config
return IConfigSource

m_pidFile protected_oe property

protected string m_pidFile
return string

m_servicePlugins protected_oe property

protected List m_servicePlugins
return List

m_shutdownCommandsFile protected_oe property

protected string m_shutdownCommandsFile
return string

m_startupCommandsFile protected_oe property

protected string m_startupCommandsFile
return string

m_version protected_oe property

Server version information. Usually VersionInfo + information about git commit, operating system, etc.
protected string m_version
return string