diff options
Diffstat (limited to 'OpenSim/Grid/AssetInventoryServer/Plugins/NullMetrics.cs')
-rw-r--r-- | OpenSim/Grid/AssetInventoryServer/Plugins/NullMetrics.cs | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/OpenSim/Grid/AssetInventoryServer/Plugins/NullMetrics.cs b/OpenSim/Grid/AssetInventoryServer/Plugins/NullMetrics.cs new file mode 100644 index 0000000..86ae5cd --- /dev/null +++ b/OpenSim/Grid/AssetInventoryServer/Plugins/NullMetrics.cs | |||
@@ -0,0 +1,150 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2008 Intel Corporation | ||
3 | * All rights reserved. | ||
4 | * Redistribution and use in source and binary forms, with or without | ||
5 | * modification, are permitted provided that the following conditions | ||
6 | * are met: | ||
7 | * | ||
8 | * -- Redistributions of source code must retain the above copyright | ||
9 | * notice, this list of conditions and the following disclaimer. | ||
10 | * -- Redistributions in binary form must reproduce the above copyright | ||
11 | * notice, this list of conditions and the following disclaimer in the | ||
12 | * documentation and/or other materials provided with the distribution. | ||
13 | * -- Neither the name of the Intel Corporation nor the names of its | ||
14 | * contributors may be used to endorse or promote products derived from | ||
15 | * this software without specific prior written permission. | ||
16 | * | ||
17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
18 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
19 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
20 | * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS | ||
21 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
22 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
23 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
24 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
25 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
28 | */ | ||
29 | |||
30 | using System; | ||
31 | using OpenMetaverse; | ||
32 | |||
33 | namespace OpenSim.Grid.AssetInventoryServer.Plugins | ||
34 | { | ||
35 | public class NullMetrics : IMetricsProvider | ||
36 | { | ||
37 | AssetInventoryServer server; | ||
38 | |||
39 | public NullMetrics() | ||
40 | { | ||
41 | } | ||
42 | |||
43 | #region IMetricsProvider implementation | ||
44 | |||
45 | public void LogAssetMetadataFetch(string extension, BackendResponse response, UUID assetID, DateTime time) | ||
46 | { | ||
47 | Logger.Log.DebugFormat("[{0}] AssetMetadataFetch(): AssetID: {1}, Response: {2}", extension, assetID, response); | ||
48 | } | ||
49 | |||
50 | public void LogAssetDataFetch(string extension, BackendResponse response, UUID assetID, int dataSize, DateTime time) | ||
51 | { | ||
52 | Logger.Log.DebugFormat("[{0}] AssetDataFetch(): AssetID: {1}, DataSize: {2}, Response: {3}", extension, assetID, | ||
53 | dataSize, response); | ||
54 | } | ||
55 | |||
56 | public void LogAssetCreate(string extension, BackendResponse response, UUID assetID, int dataSize, DateTime time) | ||
57 | { | ||
58 | Logger.Log.DebugFormat("[{0}] AssetCreate(): AssetID: {1}, DataSize: {2}, Response: {3}", extension, assetID, | ||
59 | dataSize, response); | ||
60 | } | ||
61 | |||
62 | public void LogInventoryFetch(string extension, BackendResponse response, Uri owner, UUID objID, bool folder, DateTime time) | ||
63 | { | ||
64 | Logger.Log.DebugFormat("[{0}] InventoryFetch(): ObjID: {1}, Folder: {2}, OwnerID: {3}, Response: {4}", extension, | ||
65 | objID, folder, owner, response); | ||
66 | } | ||
67 | |||
68 | public void LogInventoryFetchFolderContents(string extension, BackendResponse response, Uri owner, UUID folderID, DateTime time) | ||
69 | { | ||
70 | Logger.Log.DebugFormat("[{0}] InventoryFetchFolderContents(): FolderID: {1}, OwnerID: {2}, Response: {3}", extension, | ||
71 | folderID, owner, response); | ||
72 | } | ||
73 | |||
74 | public void LogInventoryFetchFolderList(string extension, BackendResponse response, Uri owner, DateTime time) | ||
75 | { | ||
76 | Logger.Log.DebugFormat("[{0}] InventoryFetchFolderList(): OwnerID: {1}, Response: {2}", extension, | ||
77 | owner, response); | ||
78 | } | ||
79 | |||
80 | public void LogInventoryFetchInventory(string extension, BackendResponse response, Uri owner, DateTime time) | ||
81 | { | ||
82 | Logger.Log.DebugFormat("[{0}] InventoryFetchInventory(): OwnerID: {1}, Response: {2}", extension, | ||
83 | owner, response); | ||
84 | } | ||
85 | |||
86 | public void LogInventoryFetchActiveGestures(string extension, BackendResponse response, Uri owner, DateTime time) | ||
87 | { | ||
88 | Logger.Log.DebugFormat("[{0}] InventoryFetchActiveGestures(): OwnerID: {1}, Response: {2}", extension, | ||
89 | owner, response); | ||
90 | } | ||
91 | |||
92 | public void LogInventoryCreate(string extension, BackendResponse response, Uri owner, bool folder, DateTime time) | ||
93 | { | ||
94 | Logger.Log.DebugFormat("[{0}] InventoryCreate(): OwnerID: {1}, Response: {2}", extension, | ||
95 | owner, response); | ||
96 | } | ||
97 | |||
98 | public void LogInventoryCreateInventory(string extension, BackendResponse response, DateTime time) | ||
99 | { | ||
100 | Logger.Log.DebugFormat("[{0}] InventoryCreateInventory(): Response: {1}", extension, | ||
101 | response); | ||
102 | } | ||
103 | |||
104 | public void LogInventoryDelete(string extension, BackendResponse response, Uri owner, UUID objID, bool folder, DateTime time) | ||
105 | { | ||
106 | Logger.Log.DebugFormat("[{0}] InventoryDelete(): OwnerID: {1}, Folder: {2}, Response: {3}", extension, | ||
107 | owner, folder, response); | ||
108 | } | ||
109 | |||
110 | public void LogInventoryPurgeFolder(string extension, BackendResponse response, Uri owner, UUID folderID, DateTime time) | ||
111 | { | ||
112 | Logger.Log.DebugFormat("[{0}] InventoryPurgeFolder(): OwnerID: {1}, FolderID: {2}, Response: {3}", extension, | ||
113 | owner, response); | ||
114 | } | ||
115 | |||
116 | #endregion IMetricsProvider implementation | ||
117 | |||
118 | #region IPlugin implementation | ||
119 | |||
120 | public void Initialise(AssetInventoryServer server) | ||
121 | { | ||
122 | this.server = server; | ||
123 | } | ||
124 | |||
125 | /// <summary> | ||
126 | /// <para>Initialises metrics interface</para> | ||
127 | /// </summary> | ||
128 | public void Initialise() | ||
129 | { | ||
130 | this.server = null; | ||
131 | } | ||
132 | |||
133 | public void Dispose() | ||
134 | { | ||
135 | } | ||
136 | |||
137 | public string Version | ||
138 | { | ||
139 | // TODO: this should be something meaningful and not hardcoded? | ||
140 | get { return "0.1"; } | ||
141 | } | ||
142 | |||
143 | public string Name | ||
144 | { | ||
145 | get { return "AssetInventoryServer Null Metrics"; } | ||
146 | } | ||
147 | |||
148 | #endregion IPlugin implementation | ||
149 | } | ||
150 | } | ||