|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Manages the webserver
Field Summary | |
---|---|
string | bindAddress |
Naanou.ResourceExchange.NaanouDirectContext | blockContext |
string | directUrl |
System.DateTime | lastRefresh |
Naanou.ResourceExchange.NaanouServerManager | manager |
System.Collections.ArrayList | mounts |
int | port |
Naanou.ResourceExchange.DBRefresher | refresher |
Naanou.ResourceExchange.NaanouServer | server |
string | url |
Constructor Summary | |
---|---|
ResourceExchanger(string address, int port) Constructor. Nothing is started until Naanou.ResourceExchange.ResourceExchanger.Start is called. |
Property Summary | |
---|---|
string |
AddressPortPair
Gets an ipaddress:port string for the server |
string |
DirectUrl
Gets the `direct' Url to blocks (e.g. http://localhost/direct/) |
System.DateTime | LastRefresh |
ClintHeyer.Httpd.ServerManager |
Manager
Gets the server manager |
int | MaxConnections |
int |
Port
Gets the port the server is bound to |
bool |
RefreshInProgress
Are the resources currently being refreshed? |
Naanou.ResourceExchange.NaanouServer |
Server
Gets the server |
long | Throttle |
string |
Url
Gets the base Url for this exchanger |
Method Summary | |
---|---|
void |
Clear() Clear all mounts |
void |
DenyAccess(Naanou.ResourceExchange.ResourceExchanger.SharedMount mount) Do not use this method directly, use ResourceManager.UnSharePath instead. |
ClintHeyer.Httpd.Context |
GrantAccess(string path, string description, bool recursive) Grant access to part of the filesystem to other users |
ClintHeyer.Httpd.Context |
GrantAccess(Naanou.ResourceExchange.ResourceExchanger.SharedMount mount) Grants access to a specified mount (does not add it to mounts arraylist however) |
bool | IsShared(string path) |
void |
LoadMounts(System.Collections.ArrayList mounts) Load mounts from mounts.xml into supplied array list |
Naanou.ResourceExchange.ResourceExchanger.SharedMount[] |
Mounts() Gets an array of all mounts shared |
void |
OnRefreshFinished(object sender, System.EventArgs args) Event callback from DBRefresher |
void |
OnRefreshProgress(object sender, Naanou.ResourceExchange.ProgressEventArgs args) Event callback from DBRefresher |
void | OnReplyCompleted(ClintHeyer.Httpd.Context c, ClintHeyer.Httpd.ReplyArgs args) |
void | OnReplyStarted(ClintHeyer.Httpd.Context c, ClintHeyer.Httpd.ReplyArgs args) |
void |
Refresh() Refreshes contents of database, resyncing it to the filesystem. May trigger add and removal events. |
void |
Restart() Restart |
void |
Save() Saves mounts |
void |
SaveMounts(System.Collections.ArrayList mounts) Save supplied mount list into mounts.xml in current directory |
void |
Start() Starts/restarts internal webserver |
void |
Stop() Closes down resource exchanger |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
private string bindAddress
private Naanou.ResourceExchange.NaanouDirectContext blockContext
private string directUrl
private System.DateTime lastRefresh
private Naanou.ResourceExchange.NaanouServerManager manager
private System.Collections.ArrayList mounts
private int port
private Naanou.ResourceExchange.DBRefresher refresher
private Naanou.ResourceExchange.NaanouServer server
private string url
Constructor Detail |
---|
public ResourceExchanger(string address, int port)
Constructor. Nothing is started until Naanou.ResourceExchange.ResourceExchanger.Start is called.
Parameters:
port
- Port to start webserver onProperty Detail |
---|
internal string AddressPortPair
Gets an ipaddress:port string for the server
internal string DirectUrl
Gets the `direct' Url to blocks (e.g. http://localhost/direct/)
internal System.DateTime LastRefresh
internal ClintHeyer.Httpd.ServerManager Manager
Gets the server manager
public int MaxConnections
internal int Port
Gets the port the server is bound to
internal bool RefreshInProgress
Are the resources currently being refreshed?
public Naanou.ResourceExchange.NaanouServer Server
Gets the server
public long Throttle
public string Url
Gets the base Url for this exchanger
Method Detail |
---|
internal void Clear()
Clear all mounts
internal void DenyAccess(Naanou.ResourceExchange.ResourceExchanger.SharedMount mount)
Do not use this method directly, use ResourceManager.UnSharePath instead.
Parameters:
mount
- internal ClintHeyer.Httpd.Context GrantAccess(string path, string description, bool recursive)
Grant access to part of the filesystem to other users
Parameters:
path
- Path, e.g. C:\Shared Filesdescription
- Description for mount (can be null)recursive
- Are subdirectories added?internal ClintHeyer.Httpd.Context GrantAccess(Naanou.ResourceExchange.ResourceExchanger.SharedMount mount)
Grants access to a specified mount (does not add it to mounts arraylist however)
Parameters:
mount
- Mountinternal bool IsShared(string path)
private void LoadMounts(System.Collections.ArrayList mounts)
Load mounts from mounts.xml into supplied array list
Parameters:
mounts
- public Naanou.ResourceExchange.ResourceExchanger.SharedMount[] Mounts()
Gets an array of all mounts shared
Returns:
private void OnRefreshFinished(object sender, System.EventArgs args)
Event callback from DBRefresher
Parameters:
sender
- args
- private void OnRefreshProgress(object sender, Naanou.ResourceExchange.ProgressEventArgs args)
Event callback from DBRefresher
Parameters:
sender
- args
- private void OnReplyCompleted(ClintHeyer.Httpd.Context c, ClintHeyer.Httpd.ReplyArgs args)
private void OnReplyStarted(ClintHeyer.Httpd.Context c, ClintHeyer.Httpd.ReplyArgs args)
internal void Refresh()
Refreshes contents of database, resyncing it to the filesystem. May trigger add and removal events.
internal void Restart()
Restart
public void Save()
Saves mounts
private void SaveMounts(System.Collections.ArrayList mounts)
Save supplied mount list into mounts.xml in current directory
Parameters:
mounts
- internal void Start()
Starts/restarts internal webserver
internal void Stop()
Closes down resource exchanger
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |