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

Interface to OpenSimulator's built in HTTP server. Use this to register handlers (http, llsd, xmlrpc, etc.) for given URLs. More...

Inheritance diagram for OpenSim.Framework.Servers.HttpServer.IHttpServer:
Inheritance graph
[legend]

Public Member Functions

bool AddHTTPHandler (string methodName, GenericHTTPMethod handler)
 Add a handler for an HTTP request. More...
 
bool AddPollServiceHTTPHandler (string methodName, PollServiceEventArgs args)
 
bool AddLLSDHandler (string path, LLSDMethod handler)
 Adds a LLSD handler, yay. More...
 
void AddStreamHandler (IRequestHandler handler)
 Add a stream handler to the http server. If the handler already exists, then nothing happens. More...
 
bool AddXmlRPCHandler (string method, XmlRpcMethod handler)
 
bool AddXmlRPCHandler (string method, XmlRpcMethod handler, bool keepAlive)
 
bool AddJsonRPCHandler (string method, JsonRPCMethod handler)
 
void AddWebSocketHandler (string servicepath, BaseHttpServer.WebSocketRequestDelegate handler)
 Websocket HTTP server handlers. More...
 
void RemoveWebSocketHandler (string servicepath)
 
XmlRpcMethod GetXmlRPCHandler (string method)
 Gets the XML RPC handler for given method name More...
 
bool SetDefaultLLSDHandler (DefaultLLSDMethod handler)
 
void RemoveHTTPHandler (string httpMethod, string path)
 Remove an HTTP handler More...
 
void RemovePollServiceHTTPHandler (string httpMethod, string path)
 
bool RemoveLLSDHandler (string path, LLSDMethod handler)
 
void RemoveStreamHandler (string httpMethod, string path)
 
void RemoveXmlRPCHandler (string method)
 
void RemoveJsonRPCHandler (string method)
 
string GetHTTP404 (string host)
 
string GetHTTP500 ()
 

Properties

uint SSLPort [get]
 
string SSLCommonName [get]
 
uint Port [get]
 
bool UseSSL [get]
 

Detailed Description

Interface to OpenSimulator's built in HTTP server. Use this to register handlers (http, llsd, xmlrpc, etc.) for given URLs.

Definition at line 36 of file IHttpServer.cs.

Member Function Documentation

bool OpenSim.Framework.Servers.HttpServer.IHttpServer.AddHTTPHandler ( string  methodName,
GenericHTTPMethod  handler 
)

Add a handler for an HTTP request.

This handler can actually be invoked either as

http://<hostname>:<port>/?method=<methodName>

or

http://<hostname>:<port><method>

if the method name starts with a slash. For example, AddHTTPHandler("/object/", ...) on a standalone region server will register a handler that can be invoked with either

http://localhost:9000/?method=/object/

or

http://localhost:9000/object/

In addition, the handler invoked by the HTTP server for any request is the one when best matches the request URI. So if a handler for "/myapp/" is registered and a request for "/myapp/page" is received, then the "/myapp/" handler is invoked if no "/myapp/page" handler exists.

Parameters
methodName
handler
Returns
true if the handler was successfully registered, false if a handler with the same name already existed.

Implemented in OpenSim.Framework.Servers.HttpServer.BaseHttpServer.

bool OpenSim.Framework.Servers.HttpServer.IHttpServer.AddJsonRPCHandler ( string  method,
JsonRPCMethod  handler 
)
bool OpenSim.Framework.Servers.HttpServer.IHttpServer.AddLLSDHandler ( string  path,
LLSDMethod  handler 
)

Adds a LLSD handler, yay.

Parameters
path/resource/ path
handlerhandle the LLSD response
Returns

Implemented in OpenSim.Framework.Servers.HttpServer.BaseHttpServer.

bool OpenSim.Framework.Servers.HttpServer.IHttpServer.AddPollServiceHTTPHandler ( string  methodName,
PollServiceEventArgs  args 
)
void OpenSim.Framework.Servers.HttpServer.IHttpServer.AddStreamHandler ( IRequestHandler  handler)

Add a stream handler to the http server. If the handler already exists, then nothing happens.

Parameters
handler

Implemented in OpenSim.Framework.Servers.HttpServer.BaseHttpServer.

void OpenSim.Framework.Servers.HttpServer.IHttpServer.AddWebSocketHandler ( string  servicepath,
BaseHttpServer.WebSocketRequestDelegate  handler 
)

Websocket HTTP server handlers.

Parameters
servicepath
handler
bool OpenSim.Framework.Servers.HttpServer.IHttpServer.AddXmlRPCHandler ( string  method,
XmlRpcMethod  handler 
)
bool OpenSim.Framework.Servers.HttpServer.IHttpServer.AddXmlRPCHandler ( string  method,
XmlRpcMethod  handler,
bool  keepAlive 
)
string OpenSim.Framework.Servers.HttpServer.IHttpServer.GetHTTP404 ( string  host)
string OpenSim.Framework.Servers.HttpServer.IHttpServer.GetHTTP500 ( )
XmlRpcMethod OpenSim.Framework.Servers.HttpServer.IHttpServer.GetXmlRPCHandler ( string  method)

Gets the XML RPC handler for given method name

Parameters
methodName of the method
Returns
Returns null if not found

Implemented in OpenSim.Framework.Servers.HttpServer.BaseHttpServer.

void OpenSim.Framework.Servers.HttpServer.IHttpServer.RemoveHTTPHandler ( string  httpMethod,
string  path 
)

Remove an HTTP handler

Parameters
httpMethod
path

Implemented in OpenSim.Framework.Servers.HttpServer.BaseHttpServer.

void OpenSim.Framework.Servers.HttpServer.IHttpServer.RemoveJsonRPCHandler ( string  method)
bool OpenSim.Framework.Servers.HttpServer.IHttpServer.RemoveLLSDHandler ( string  path,
LLSDMethod  handler 
)
void OpenSim.Framework.Servers.HttpServer.IHttpServer.RemovePollServiceHTTPHandler ( string  httpMethod,
string  path 
)
void OpenSim.Framework.Servers.HttpServer.IHttpServer.RemoveStreamHandler ( string  httpMethod,
string  path 
)
void OpenSim.Framework.Servers.HttpServer.IHttpServer.RemoveWebSocketHandler ( string  servicepath)
void OpenSim.Framework.Servers.HttpServer.IHttpServer.RemoveXmlRPCHandler ( string  method)
bool OpenSim.Framework.Servers.HttpServer.IHttpServer.SetDefaultLLSDHandler ( DefaultLLSDMethod  handler)

Property Documentation

uint OpenSim.Framework.Servers.HttpServer.IHttpServer.Port
get

Definition at line 41 of file IHttpServer.cs.

string OpenSim.Framework.Servers.HttpServer.IHttpServer.SSLCommonName
get

Definition at line 39 of file IHttpServer.cs.

uint OpenSim.Framework.Servers.HttpServer.IHttpServer.SSLPort
get

Definition at line 38 of file IHttpServer.cs.

bool OpenSim.Framework.Servers.HttpServer.IHttpServer.UseSSL
get

Definition at line 42 of file IHttpServer.cs.


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