C# 클래스 Woopsa.WoopsaServer

상속: IDisposable
파일 보기 프로젝트 열기: woopsa-protocol/Woopsa 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void
EnterModelAccessFreeSection ( ) : WoopsaServerModelAccessFreeSection

This method simply calls BeforeWoopsaModelAccess to trigger concurrent access protection over the woopsa model.

ShutDown ( ) : void
WoopsaServer ( IWoopsaContainer root, WebServer server, string routePrefix = DefaultServerPrefix ) : System

Creates an instance of the Woopsa server without using the Reflector. You will have to create the object hierarchy yourself, using WoopsaObjects or implementing IWoopsaContainer yourself. If you are already using a WebServer somewhere else, this constructor will simply add the woopsa routes to that server. This allows you to serve static content and the Woopsa protocol on the same network interface and on the same port.

WoopsaServer ( IWoopsaContainer root, int port = DefaultPort, string routePrefix = DefaultServerPrefix, int threadPoolSize = CustomThreadPool.DefaultThreadPoolSize, ThreadPriority priority = DefaultThreadPriority ) : System

Creates an instance of the Woopsa server without using the Reflector. You will have to create the object hierarchy yourself, using WoopsaObjects or implementing IWoopsaContainer yourself. It will automatically create the required HTTP server on the specified port and will prefix woopsa verbs with the specified route prefix. It will also add all the necessary native extensions for Publish/Subscribe and Mutli-Requests.

WoopsaServer ( WoopsaObject root, int port = DefaultPort, string routePrefix = DefaultServerPrefix ) : System

Creates an instance of the Woopsa server adding multiRequestHandler and SubscriptionService It will automatically create the required HTTP server on the specified port and will prefix woopsa verbs with the specified route prefix. It will also add all the necessary native extensions for Publish/Subscribe and Mutli-Requests.

WoopsaServer ( object root, int port = DefaultPort, string routePrefix = DefaultServerPrefix ) : System

Creates an instance of the Woopsa server with a new Reflector for the object passed to it. It will automatically create the required HTTP server on the specified port and will prefix woopsa verbs with the specified route prefix. It will also add all the necessary native extensions for Publish/Subscribe and Mutli-Requests.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void
ExecuteAfterWoopsaModelAccess ( ) : void
ExecuteBeforeWoopsaModelAccess ( ) : void
OnAfterWoopsaModelAccess ( ) : void
OnBeforeWoopsaModelAccess ( ) : void

비공개 메소드들

메소드 설명
AddRoutes ( ) : void
FindByPath ( string searchPath ) : IWoopsaElement
GetMetadata ( string path ) : string
HandleRequest ( WoopsaVerb verb, HTTPRequest request, HTTPResponse response ) : void
InvokeMethod ( string path, NameValueCollection arguments ) : string
InvokeMethodDeserializedJson ( string path, object>.Dictionary arguments ) : string
ReadValue ( string path ) : string
RemoveRoutes ( ) : void
WriteValue ( string path, string value ) : string
WriteValueDeserializedJson ( string path, object deserializedJson ) : string

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

EnterModelAccessFreeSection() 공개 메소드

This method simply calls BeforeWoopsaModelAccess to trigger concurrent access protection over the woopsa model.
public EnterModelAccessFreeSection ( ) : WoopsaServerModelAccessFreeSection
리턴 WoopsaServerModelAccessFreeSection

ExecuteAfterWoopsaModelAccess() 보호된 메소드

protected ExecuteAfterWoopsaModelAccess ( ) : void
리턴 void

ExecuteBeforeWoopsaModelAccess() 보호된 메소드

protected ExecuteBeforeWoopsaModelAccess ( ) : void
리턴 void

OnAfterWoopsaModelAccess() 보호된 메소드

protected OnAfterWoopsaModelAccess ( ) : void
리턴 void

OnBeforeWoopsaModelAccess() 보호된 메소드

protected OnBeforeWoopsaModelAccess ( ) : void
리턴 void

ShutDown() 공개 메소드

public ShutDown ( ) : void
리턴 void

WoopsaServer() 공개 메소드

Creates an instance of the Woopsa server without using the Reflector. You will have to create the object hierarchy yourself, using WoopsaObjects or implementing IWoopsaContainer yourself. If you are already using a WebServer somewhere else, this constructor will simply add the woopsa routes to that server. This allows you to serve static content and the Woopsa protocol on the same network interface and on the same port.
public WoopsaServer ( IWoopsaContainer root, WebServer server, string routePrefix = DefaultServerPrefix ) : System
root IWoopsaContainer The root object that will be published via Woopsa.
server WebServer The server on which Woopsa routes will be added
routePrefix string /// The prefix to add to all routes for woopsa verbs. For example, specifying /// "myPrefix" will make the server available on http://server/myPrefix ///
리턴 System

WoopsaServer() 공개 메소드

Creates an instance of the Woopsa server without using the Reflector. You will have to create the object hierarchy yourself, using WoopsaObjects or implementing IWoopsaContainer yourself. It will automatically create the required HTTP server on the specified port and will prefix woopsa verbs with the specified route prefix. It will also add all the necessary native extensions for Publish/Subscribe and Mutli-Requests.
public WoopsaServer ( IWoopsaContainer root, int port = DefaultPort, string routePrefix = DefaultServerPrefix, int threadPoolSize = CustomThreadPool.DefaultThreadPoolSize, ThreadPriority priority = DefaultThreadPriority ) : System
root IWoopsaContainer The root object that will be published via Woopsa.
port int The port on which to run the web server
routePrefix string /// The prefix to add to all routes for woopsa verbs. For example, specifying /// "myPrefix" will make the server available on http://server/myPrefix ///
threadPoolSize int /// The maximum number of threads to be created. /// CustomThreadPool.DefaultThreadPoolSize means use default operating system value.
priority ThreadPriority /// The priority of the server threads. ///
리턴 System

WoopsaServer() 공개 메소드

Creates an instance of the Woopsa server adding multiRequestHandler and SubscriptionService It will automatically create the required HTTP server on the specified port and will prefix woopsa verbs with the specified route prefix. It will also add all the necessary native extensions for Publish/Subscribe and Mutli-Requests.
public WoopsaServer ( WoopsaObject root, int port = DefaultPort, string routePrefix = DefaultServerPrefix ) : System
root WoopsaObject The root object that will be published via Woopsa.
port int The port on which to run the web server
routePrefix string /// The prefix to add to all routes for woopsa verbs. For example, specifying /// "myPrefix" will make the server available on http://server/myPrefix ///
리턴 System

WoopsaServer() 공개 메소드

Creates an instance of the Woopsa server with a new Reflector for the object passed to it. It will automatically create the required HTTP server on the specified port and will prefix woopsa verbs with the specified route prefix. It will also add all the necessary native extensions for Publish/Subscribe and Mutli-Requests.
public WoopsaServer ( object root, int port = DefaultPort, string routePrefix = DefaultServerPrefix ) : System
root object The root object that will be published via Woopsa.
port int The port on which to run the web server
routePrefix string /// The prefix to add to all routes for woopsa verbs. For example, specifying /// "myPrefix" will make the server available on http://server/myPrefix ///
리턴 System