C# 클래스 org.GraphDefined.Vanaheimr.Hermod.HTTP.HTTPStandardHandlers

Standard handlers for HTTP servers.
파일 보기 프로젝트 열기: Vanaheimr/Hermod

공개 메소드들

메소드 설명
RegisterEventStreamHandler ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String EventSource ) : void

Register a EventStream handler.

RegisterFilesystemFile ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String>.Func ResourceFilenameBuilder, String DefaultFile = null, HTTPContentType ResponseContentType = null, String CacheControl = "no-cache" ) : void

Returns a resource from the given file system location.

RegisterFilesystemFolder ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String>.Func ResourcePath, String DefaultFilename = "index.html" ) : void

Returns resources from the given file system location.

RegisterMovedTemporarilyHandler ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String URITarget ) : void

Register a MovedTemporarily handler.

RegisterRAWRequestHandler ( this HTTPServer, HTTPHostname Hostname, String URITemplate, HTTPMethod HTTPMethod = null ) : void

Return the RAW request header.

RegisterResourcesFile ( this HTTPServer, HTTPHostname Hostname, String URITemplate, Assembly ResourceAssembly, String ResourceFilename, HTTPContentType ResponseContentType = null, String CacheControl = "no-cache" ) : void

Returns internal resources embedded within the given assembly.

RegisterResourcesFolder ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String ResourcePath, Assembly ResourceAssembly = null, String DefaultFilename = "index.html", String HTTPRealm = null, String HTTPLogin = null, String HTTPPassword = null ) : void

Returns internal resources embedded within the given assembly.

RegisterWatchedFileSystemFolder ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String FileSystemLocation, String HTTPSSE_EventIdentification, String HTTPSSE_URITemplate, String DefaultFilename = "index.html" ) : void

Returns resources from the given file system location.

RegisterWatchedFileSystemFolder ( this HTTPServer, String URITemplate, String FileSystemLocation, String HTTPSSE_EventIdentification, String HTTPSSE_URITemplate, String DefaultFilename = "index.html" ) : void

Returns resources from the given file system location.

비공개 메소드들

메소드 설명
FileWasChanged ( HTTPServer source, String HTTPSSE_EventIdentification, String ChangeType, String FileName ) : void
FileWasRenamed ( object source, RenamedEventArgs e ) : void
FileWatcherError ( object sender, ErrorEventArgs e ) : void

메소드 상세

RegisterEventStreamHandler() 공개 정적인 메소드

Register a EventStream handler.
public static RegisterEventStreamHandler ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String EventSource ) : void
HTTPServer this
Hostname HTTPHostname
URITemplate String
EventSource String
리턴 void

RegisterFilesystemFile() 공개 정적인 메소드

Returns a resource from the given file system location.
public static RegisterFilesystemFile ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String>.Func ResourceFilenameBuilder, String DefaultFile = null, HTTPContentType ResponseContentType = null, String CacheControl = "no-cache" ) : void
HTTPServer this A HTTP server.
Hostname HTTPHostname The HTTP hostname.
URITemplate String An URI template.
ResourceFilenameBuilder String>.Func The path to the file within the assembly.
DefaultFile String If an error occures, return this file.
ResponseContentType HTTPContentType Set the HTTP MIME content-type of the file. If null try to autodetect the content type based on the filename extention.
CacheControl String Set the HTTP cache control response header.
리턴 void

RegisterFilesystemFolder() 공개 정적인 메소드

Returns resources from the given file system location.
public static RegisterFilesystemFolder ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String>.Func ResourcePath, String DefaultFilename = "index.html" ) : void
HTTPServer this A HTTP server.
Hostname HTTPHostname The HTTP hostname.
URITemplate String An URI template.
ResourcePath String>.Func The path to the file within the assembly.
DefaultFilename String The default file to load.
리턴 void

RegisterMovedTemporarilyHandler() 공개 정적인 메소드

Register a MovedTemporarily handler.
public static RegisterMovedTemporarilyHandler ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String URITarget ) : void
HTTPServer this
Hostname HTTPHostname
URITemplate String
URITarget String
리턴 void

RegisterRAWRequestHandler() 공개 정적인 메소드

Return the RAW request header.
public static RegisterRAWRequestHandler ( this HTTPServer, HTTPHostname Hostname, String URITemplate, HTTPMethod HTTPMethod = null ) : void
HTTPServer this
Hostname HTTPHostname
URITemplate String
HTTPMethod HTTPMethod
리턴 void

RegisterResourcesFile() 공개 정적인 메소드

Returns internal resources embedded within the given assembly.
public static RegisterResourcesFile ( this HTTPServer, HTTPHostname Hostname, String URITemplate, Assembly ResourceAssembly, String ResourceFilename, HTTPContentType ResponseContentType = null, String CacheControl = "no-cache" ) : void
HTTPServer this A HTTP server.
Hostname HTTPHostname The HTTP hostname.
URITemplate String An URI template.
ResourceAssembly System.Reflection.Assembly The assembly where the resources are located.
ResourceFilename String The path to the file within the assembly.
ResponseContentType HTTPContentType Set the HTTP MIME content-type of the file. If null try to autodetect the content type based on the filename extention.
CacheControl String Set the HTTP cache control response header.
리턴 void

RegisterResourcesFolder() 공개 정적인 메소드

Returns internal resources embedded within the given assembly.
public static RegisterResourcesFolder ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String ResourcePath, Assembly ResourceAssembly = null, String DefaultFilename = "index.html", String HTTPRealm = null, String HTTPLogin = null, String HTTPPassword = null ) : void
HTTPServer this A HTTP server.
Hostname HTTPHostname The HTTP hostname.
URITemplate String An URI template.
ResourcePath String The path to the file within the assembly.
ResourceAssembly System.Reflection.Assembly Optionally the assembly where the resources are located (default: the calling assembly).
DefaultFilename String The default file to load.
HTTPRealm String An optional realm for HTTP basic authentication.
HTTPLogin String An optional login for HTTP basic authentication.
HTTPPassword String An optional password for HTTP basic authentication.
리턴 void

RegisterWatchedFileSystemFolder() 공개 정적인 메소드

Returns resources from the given file system location.
public static RegisterWatchedFileSystemFolder ( this HTTPServer, HTTPHostname Hostname, String URITemplate, String FileSystemLocation, String HTTPSSE_EventIdentification, String HTTPSSE_URITemplate, String DefaultFilename = "index.html" ) : void
HTTPServer this A HTTP server.
Hostname HTTPHostname
URITemplate String An URI template.
FileSystemLocation String
HTTPSSE_EventIdentification String
HTTPSSE_URITemplate String
DefaultFilename String The default file to load.
리턴 void

RegisterWatchedFileSystemFolder() 공개 정적인 메소드

Returns resources from the given file system location.
public static RegisterWatchedFileSystemFolder ( this HTTPServer, String URITemplate, String FileSystemLocation, String HTTPSSE_EventIdentification, String HTTPSSE_URITemplate, String DefaultFilename = "index.html" ) : void
HTTPServer this A HTTP server.
URITemplate String An URI template.
FileSystemLocation String
HTTPSSE_EventIdentification String
HTTPSSE_URITemplate String
DefaultFilename String The default file to load.
리턴 void