C# Class Appcelerator.ServiceManager

显示文件 Open project: appcelerator/entourage Class Usage Examples

Public Methods

Method Description
HandleRequest ( Message request, Message response, System.Web.SessionState.HttpSessionState session, HttpResponse httpresponse ) : void

Invokes the appropriate handler for a given request

ParseIncomingMessages ( HttpContext context, ServiceBroker broker, RequestDetails details, String content_type ) : List

Parses incoming messages and returns a list to be dispatched

RegisterServiceHandlers ( ) : void

Finds and initializes service handlers (methods with a ServiceAttribute defined)

ServiceManager ( ) : System

Initializes the service manager, loads assemblies from the deploy dir and adds a file system watcher to load new assemblies upon their creation

Private Methods

Method Description
LoadServiceHandlerAssemblies ( ) : void

Loads all assemblies in the deploy directory

LoadSingleAssembly ( String file_location ) : void

Loads a single assembly given its full path

RegisterServicesFromAssembly ( Assembly assy ) : void
fsw_Created ( object sender, FileSystemEventArgs e ) : void

Handles the file created event in the deploy dir so we can load assemblies

Method Details

HandleRequest() public method

Invokes the appropriate handler for a given request
public HandleRequest ( Message request, Message response, System.Web.SessionState.HttpSessionState session, HttpResponse httpresponse ) : void
request Message The ServiceRequest object corresponding to the incoming request
response Message The ServiceResponse object corresponding to the outgoing response
session System.Web.SessionState.HttpSessionState
httpresponse System.Web.HttpResponse
return void

ParseIncomingMessages() public method

Parses incoming messages and returns a list to be dispatched
public ParseIncomingMessages ( HttpContext context, ServiceBroker broker, RequestDetails details, String content_type ) : List
context System.Web.HttpContext The HttpContext of the request
broker ServiceBroker The ServiceBroker handling the request
details RequestDetails The RequestDetails from the request
content_type String
return List

RegisterServiceHandlers() public method

Finds and initializes service handlers (methods with a ServiceAttribute defined)
public RegisterServiceHandlers ( ) : void
return void

ServiceManager() public method

Initializes the service manager, loads assemblies from the deploy dir and adds a file system watcher to load new assemblies upon their creation
public ServiceManager ( ) : System
return System