C# Class OpenQA.Selenium.Remote.Server.RemoteServer

Handles requests from remote clients to perform automated tests.
Inheritance: IDisposable
显示文件 Open project: jimevans/strontium

Public Methods

Method Description
Dispose ( ) : void

Releases all resources associated with this RemoteServer.

RegisterWithHub ( string hubLocation ) : void

Registers this server with a grid hub.

StartListening ( ) : void

Starts the remote server listening for requests.

StopListening ( ) : void

Stops the remote server listening for requests.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases all managed and unmanaged resources associated with this RemoteServer.

OnShutdownRequested ( EventArgs e ) : void

Raises the ShutdownRequested event.

RemoteServer ( int port, string path, CommandHandlerFactory handlerFactory ) : System

Initializes a new instance of the RemoteServer class using the specified port and relative path.

RemoteServer ( int port, string path, CommandHandlerFactory handlerFactory, Logger log ) : System

Initializes a new instance of the RemoteServer class using the specified port and relative path.

RemoteServer ( string basePath, int port, string path, CommandHandlerFactory handlerFactory, Logger log ) : System

Initializes a new instance of the RemoteServer class using the specified port, relative path, and logger.

Private Methods

Method Description
ConstructDispatcherTables ( string prefix ) : void
CreateErrorResponse ( string commandName, Exception ex ) : ErrorResponse
DispatchRequest ( Uri resourcePath, string httpMethod, string requestBody ) : ServerResponse
FindDispatcherTable ( string httpMethod ) : System.UriTemplateTable
GetIPAddressList ( ) : List
OnClientConnect ( IAsyncResult result ) : void
ProcessContext ( HttpListenerContext context ) : void

Method Details

Dispose() public method

Releases all resources associated with this RemoteServer.
public Dispose ( ) : void
return void

Dispose() protected method

Releases all managed and unmanaged resources associated with this RemoteServer.
protected Dispose ( bool disposing ) : void
disposing bool to dispose of managed and /// unmanaged resources; to dispose of only unmanaged /// resources.
return void

OnShutdownRequested() protected method

Raises the ShutdownRequested event.
protected OnShutdownRequested ( EventArgs e ) : void
e System.EventArgs An object describing the event.
return void

RegisterWithHub() public method

Registers this server with a grid hub.
public RegisterWithHub ( string hubLocation ) : void
hubLocation string The location of the hub.
return void

RemoteServer() protected method

Initializes a new instance of the RemoteServer class using the specified port and relative path.
protected RemoteServer ( int port, string path, CommandHandlerFactory handlerFactory ) : System
port int The port to listen on.
path string The relative path to connect to.
handlerFactory CommandHandlerFactory A used to create instances for handling commands.
return System

RemoteServer() protected method

Initializes a new instance of the RemoteServer class using the specified port and relative path.
protected RemoteServer ( int port, string path, CommandHandlerFactory handlerFactory, Logger log ) : System
port int The port to listen on.
path string The relative path to connect to.
handlerFactory CommandHandlerFactory A used to create instances for handling commands.
log Logger A used to log information in the server.
return System

RemoteServer() protected method

Initializes a new instance of the RemoteServer class using the specified port, relative path, and logger.
protected RemoteServer ( string basePath, int port, string path, CommandHandlerFactory handlerFactory, Logger log ) : System
basePath string The base path of the server to listen on.
port int The port to listen on.
path string The relative path to connect to.
handlerFactory CommandHandlerFactory A used to create instances for handling commands.
log Logger A object describing how to log information about commands executed.
return System

StartListening() public method

Starts the remote server listening for requests.
public StartListening ( ) : void
return void

StopListening() public method

Stops the remote server listening for requests.
public StopListening ( ) : void
return void