aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
diff options
context:
space:
mode:
authorMelanie2013-07-18 10:08:10 +0100
committerMelanie2013-07-18 10:08:10 +0100
commit7830cc995471120892a24a39e86283774fa07c4c (patch)
treed3f46b4f3ce95bb8572511c6f12c9f8ca86922c8 /OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
parentMerge branch 'master' into careminster (diff)
parentDocument obscure Groups config related to the user level required for creatin... (diff)
downloadopensim-SC_OLD-7830cc995471120892a24a39e86283774fa07c4c.zip
opensim-SC_OLD-7830cc995471120892a24a39e86283774fa07c4c.tar.gz
opensim-SC_OLD-7830cc995471120892a24a39e86283774fa07c4c.tar.bz2
opensim-SC_OLD-7830cc995471120892a24a39e86283774fa07c4c.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/Framework/Scenes/ScenePresence.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs OpenSim/Server/Handlers/Simulation/AgentHandlers.cs OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs OpenSim/Services/HypergridService/UserAgentService.cs
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs27
1 files changed, 24 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
index 6342983..252cc2a 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandler.cs
@@ -29,14 +29,35 @@ using System.IO;
29 29
30namespace OpenSim.Framework.Servers.HttpServer 30namespace OpenSim.Framework.Servers.HttpServer
31{ 31{
32 /// <summary>
33 /// Base streamed request handler.
34 /// </summary>
35 /// <remarks>
36 /// Inheriting classes should override ProcessRequest() rather than Handle()
37 /// </remarks>
32 public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler 38 public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
33 { 39 {
34 public abstract byte[] Handle(string path, Stream request,
35 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse);
36
37 protected BaseStreamHandler(string httpMethod, string path) : this(httpMethod, path, null, null) {} 40 protected BaseStreamHandler(string httpMethod, string path) : this(httpMethod, path, null, null) {}
38 41
39 protected BaseStreamHandler(string httpMethod, string path, string name, string description) 42 protected BaseStreamHandler(string httpMethod, string path, string name, string description)
40 : base(httpMethod, path, name, description) {} 43 : base(httpMethod, path, name, description) {}
44
45 public virtual byte[] Handle(
46 string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
47 {
48 RequestsReceived++;
49
50 byte[] result = ProcessRequest(path, request, httpRequest, httpResponse);
51
52 RequestsHandled++;
53
54 return result;
55 }
56
57 protected virtual byte[] ProcessRequest(
58 string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
59 {
60 return null;
61 }
41 } 62 }
42} \ No newline at end of file 63} \ No newline at end of file