OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | Properties | List of all members
OpenSim.Framework.Servers.MainServer Class Reference

Static Public Member Functions

static void RegisterHttpConsoleCommands (ICommandConsole console)
 
static void AddHttpServer (BaseHttpServer server)
 Register an already started HTTP server to the collection of known servers. More...
 
static bool RemoveHttpServer (uint port)
 Removes the http server listening on the given port. More...
 
static bool ContainsHttpServer (uint port)
 Does this collection of servers contain one with the given port? More...
 
static IHttpServer GetHttpServer (uint port)
 Get the default http server or an http server for a specific port. More...
 
static IHttpServer GetHttpServer (uint port, IPAddress ipaddr)
 Get the default http server, an http server for a specific port and/or an http server bound to a specific address More...
 

Properties

static int DebugLevel [get, set]
 Control the printing of certain debug messages. More...
 
static BaseHttpServer Instance [get, set]
 Set the main HTTP server instance. More...
 
static Dictionary< uint,
BaseHttpServer
Servers [get]
 Get all the registered servers. More...
 

Detailed Description

Definition at line 40 of file MainServer.cs.

Member Function Documentation

static void OpenSim.Framework.Servers.MainServer.AddHttpServer ( BaseHttpServer  server)
inlinestatic

Register an already started HTTP server to the collection of known servers.

Parameters
server

Definition at line 266 of file MainServer.cs.

static bool OpenSim.Framework.Servers.MainServer.ContainsHttpServer ( uint  port)
inlinestatic

Does this collection of servers contain one with the given port?

Unlike GetHttpServer, this will not instantiate a server if one does not exist on that port.

Parameters
port
Returns
true if a server with the given port is registered, false otherwise.

Definition at line 304 of file MainServer.cs.

static IHttpServer OpenSim.Framework.Servers.MainServer.GetHttpServer ( uint  port)
inlinestatic

Get the default http server or an http server for a specific port.

If the requested HTTP server doesn't already exist then a new one is instantiated and started.

Returns
Parameters
portIf 0 then the default HTTP server is returned.

Definition at line 318 of file MainServer.cs.

Here is the caller graph for this function:

static IHttpServer OpenSim.Framework.Servers.MainServer.GetHttpServer ( uint  port,
IPAddress  ipaddr 
)
inlinestatic

Get the default http server, an http server for a specific port and/or an http server bound to a specific address

If the requested HTTP server doesn't already exist then a new one is instantiated and started.

Returns
Parameters
portIf 0 then the default HTTP server is returned.
ipaddrA specific IP address to bind to. If null then the default IP address is used.

Definition at line 333 of file MainServer.cs.

static void OpenSim.Framework.Servers.MainServer.RegisterHttpConsoleCommands ( ICommandConsole  console)
inlinestatic

Definition at line 108 of file MainServer.cs.

static bool OpenSim.Framework.Servers.MainServer.RemoveHttpServer ( uint  port)
inlinestatic

Removes the http server listening on the given port.

It is the responsibility of the caller to do clean up.

Parameters
port
Returns

Definition at line 285 of file MainServer.cs.

Property Documentation

int OpenSim.Framework.Servers.MainServer.DebugLevel
staticgetset

Control the printing of certain debug messages.

If DebugLevel >= 1 then short warnings are logged when receiving bad input data. If DebugLevel >= 2 then long warnings are logged when receiving bad input data. If DebugLevel >= 3 then short notices about all incoming non-poll HTTP requests are logged. If DebugLevel >= 4 then the time taken to fulfill the request is logged. If DebugLevel >= 5 then the start of the body of incoming non-poll HTTP requests will be logged. If DebugLevel >= 6 then the entire body of incoming non-poll HTTP requests will be logged.

Definition at line 59 of file MainServer.cs.

BaseHttpServer OpenSim.Framework.Servers.MainServer.Instance
staticgetset

Set the main HTTP server instance.

This will be used to register all handlers that listen to the default port.

Exceptions
ExceptionThrown if the HTTP server has not already been registered via AddHttpServer()

Definition at line 83 of file MainServer.cs.

Dictionary<uint, BaseHttpServer> OpenSim.Framework.Servers.MainServer.Servers
staticget

Get all the registered servers.

Returns a copy of the dictionary so this can be iterated through without locking.

Definition at line 104 of file MainServer.cs.


The documentation for this class was generated from the following file: