|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
A context is a `partition' of the server. Handlers are contexts. Servers are contexts. ServerManagers are contexts. A context can have sub-contexts. Each context can have its own configuration defined for it, or if it is missing, will use its parents configuration - Apache style.
Field Summary | |
---|---|
System.Collections.Hashtable |
configuration
Configuration data |
System.Collections.ArrayList |
contexts
Children contexts (Do not modify directly) |
ClintHeyer.Httpd.IHandler |
FallbackReponder
Fallback response handler |
ClintHeyer.Httpd.Lock |
padlock
Lock |
ClintHeyer.Httpd.Context |
parent
Parent context (Do not modify directly) |
bool |
requiresSession
Does context require a session |
System.Collections.Hashtable |
responseHandlers
Response handlers for context |
ClintHeyer.Httpd.ISessionManager |
sessionManager
Session manager |
long |
throttleRate
Throttling rate (bps) set to 0 for no throttling |
Constructor Summary | |
---|---|
Context() Empty constructor for serialization |
|
Context(ClintHeyer.Httpd.Context parent, ClintHeyer.Httpd.Lock padlock) Constructor |
Property Summary | |
---|---|
ClintHeyer.Httpd.Lock |
Lock
Gets or sets the lock to use for this context |
ClintHeyer.Httpd.Context |
Parent
Gets the parent context of this context |
bool |
RequiresSession
Gets or sets whether this context requires a valid session to be accessable |
ClintHeyer.Httpd.ServerManager |
ServerManager
Gets the ServerManager for this context |
ClintHeyer.Httpd.ISessionManager |
SessionManager
Gets or sets the session manager. If this context does not have a manager defined, it will return its parents. |
long |
ThrottleRate
Gets or sets the global throttling rate (Bps) for this context Child contexts also get modified by setting this property. |
ClintHeyer.Httpd.TicketIssuer |
TicketIssuer
Gets the ticket issuer instance for this context (if any) |
string |
Url
Gets the Url-root for this context |
Method Summary | |
---|---|
void |
AddContext(ClintHeyer.Httpd.Context context) Adds a child context. Child context will have their ThrottleRate to be the same as the parent |
void |
AddResponseHandler(ClintHeyer.Httpd.HttpResponse response, ClintHeyer.Httpd.IHandler handler) Adds a response handler |
bool |
CanHandleRequest(string request) Returns whether the request string falls under something this context can serve |
ClintHeyer.Httpd.Context[] |
GetContexts() Gets all the children contexts of this context (not recursive) |
string |
GetMimeType(string identifier) Returns the MIME type for a given identified (usually file extension) or the default type for this context |
ClintHeyer.Httpd.IHandler |
GetResponseHandler(ClintHeyer.Httpd.HttpResponse response) Gets a handler for a given response |
void |
Handle(ClintHeyer.Httpd.HttpRequest request, string p) Handles a request |
object | IConfigurable.Get(object key) |
bool | IConfigurable.GetBool(object key) |
float | IConfigurable.GetFloat(object key) |
int | IConfigurable.GetInt(object key) |
string | IConfigurable.GetString(object key) |
void | LoadConfig() |
void |
OnReplyCompleted(ClintHeyer.Httpd.HttpReply reply) Notification from a reply that it has finished/closed. Override this, make sure base gets called |
void |
OnReplyCompletedEvent(ClintHeyer.Httpd.Context source, ClintHeyer.Httpd.ReplyArgs args) Triggers reply completed event. |
void |
OnReplyStarted(ClintHeyer.Httpd.HttpReply reply) Notification from a reply that it has started within this context |
void |
OnReplyStartedEvent(ClintHeyer.Httpd.Context source, ClintHeyer.Httpd.ReplyArgs args) Triggers reply started event |
void |
OnThrottleChange(ClintHeyer.Httpd.ThrottleChangeEvent args) Throttle has changed |
void |
OnThrottleChangeEvent(ClintHeyer.Httpd.Context source, ClintHeyer.Httpd.ThrottleChangeEvent args) Triggers throttle change event |
void |
RemoveContext(ClintHeyer.Httpd.Context context) Removes a child context. |
void | SaveConfig() |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Event Summary | |
---|---|
ClintHeyer.Httpd.ReplyCompletedEventHandler |
ReplyCompleted
A reply has finished |
ClintHeyer.Httpd.ReplyStartedEventHandler |
ReplyStarted
A reply has started |
ClintHeyer.Httpd.ThrottleChangeEventHandler |
ThrottleChange
Throttle rate has changed |
Field Detail |
---|
protected System.Collections.Hashtable configuration
Configuration data
protected System.Collections.ArrayList contexts
Children contexts (Do not modify directly)
public ClintHeyer.Httpd.IHandler FallbackReponder
Fallback response handler
protected ClintHeyer.Httpd.Lock padlock
Lock
protected ClintHeyer.Httpd.Context parent
Parent context (Do not modify directly)
protected bool requiresSession
Does context require a session
private System.Collections.Hashtable responseHandlers
Response handlers for context
protected ClintHeyer.Httpd.ISessionManager sessionManager
Session manager
protected long throttleRate
Throttling rate (bps) set to 0 for no throttling
Constructor Detail |
---|
private Context()
Empty constructor for serialization
public Context(ClintHeyer.Httpd.Context parent, ClintHeyer.Httpd.Lock padlock)
Constructor
Parameters:
parent
- Parentpadlock
- LockProperty Detail |
---|
public ClintHeyer.Httpd.Lock Lock
Gets or sets the lock to use for this context
public ClintHeyer.Httpd.Context Parent
Gets the parent context of this context
public bool RequiresSession
Gets or sets whether this context requires a valid session to be accessable
public ClintHeyer.Httpd.ServerManager ServerManager
Gets the ServerManager for this context
public ClintHeyer.Httpd.ISessionManager SessionManager
Gets or sets the session manager. If this context does not have a manager defined, it will return its parents.
public long ThrottleRate
Gets or sets the global throttling rate (Bps) for this context Child contexts also get modified by setting this property.
public ClintHeyer.Httpd.TicketIssuer TicketIssuer
Gets the ticket issuer instance for this context (if any)
public string Url
Gets the Url-root for this context
Method Detail |
---|
public void AddContext(ClintHeyer.Httpd.Context context)
Adds a child context. Child context will have their ThrottleRate to be the same as the parent
Parameters:
context
- Contextpublic void AddResponseHandler(ClintHeyer.Httpd.HttpResponse response, ClintHeyer.Httpd.IHandler handler)
Adds a response handler
Parameters:
response
- Response to handlehandler
- Handlerpublic bool CanHandleRequest(string request)
Returns whether the request string falls under something this context can serve
Parameters:
request
- Requestpublic ClintHeyer.Httpd.Context[] GetContexts()
Gets all the children contexts of this context (not recursive)
Returns:
public string GetMimeType(string identifier)
Returns the MIME type for a given identified (usually file extension) or the default type for this context
Parameters:
identifier
- MIME identifiedpublic ClintHeyer.Httpd.IHandler GetResponseHandler(ClintHeyer.Httpd.HttpResponse response)
Gets a handler for a given response
Parameters:
response
- Responsepublic void Handle(ClintHeyer.Httpd.HttpRequest request, string p)
Handles a request
Parameters:
request
- Requestp
- Extra path informationprivate object IConfigurable.Get(object key)
private bool IConfigurable.GetBool(object key)
private float IConfigurable.GetFloat(object key)
private int IConfigurable.GetInt(object key)
private string IConfigurable.GetString(object key)
public void LoadConfig()
public void OnReplyCompleted(ClintHeyer.Httpd.HttpReply reply)
Notification from a reply that it has finished/closed. Override this, make sure base gets called
Parameters:
reply
- Reply that has finishedpublic void OnReplyCompletedEvent(ClintHeyer.Httpd.Context source, ClintHeyer.Httpd.ReplyArgs args)
Triggers reply completed event.
Parameters:
source
- Sourceargs
- Event argspublic void OnReplyStarted(ClintHeyer.Httpd.HttpReply reply)
Notification from a reply that it has started within this context
If overridden, ensure that base gets called, which triggers events
Parameters:reply
- Replypublic void OnReplyStartedEvent(ClintHeyer.Httpd.Context source, ClintHeyer.Httpd.ReplyArgs args)
Triggers reply started event
Parameters:
source
- Sourceargs
- Event argsprotected void OnThrottleChange(ClintHeyer.Httpd.ThrottleChangeEvent args)
Throttle has changed
Parameters:
args
- Event argsprotected void OnThrottleChangeEvent(ClintHeyer.Httpd.Context source, ClintHeyer.Httpd.ThrottleChangeEvent args)
Triggers throttle change event
Parameters:
source
- Sourceargs
- Event argspublic void RemoveContext(ClintHeyer.Httpd.Context context)
Removes a child context.
Parameters:
context
- Context to removepublic void SaveConfig()
Event Detail |
---|
public ClintHeyer.Httpd.ReplyCompletedEventHandler ReplyCompleted
A reply has finished
public ClintHeyer.Httpd.ReplyStartedEventHandler ReplyStarted
A reply has started
public ClintHeyer.Httpd.ThrottleChangeEventHandler ThrottleChange
Throttle rate has changed
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |