copland 0.8.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/doc/manual-html/chapter-1.html +227 -36
  2. data/doc/manual-html/chapter-10.html +155 -82
  3. data/doc/manual-html/chapter-11.html +90 -267
  4. data/doc/manual-html/chapter-12.html +289 -71
  5. data/doc/manual-html/chapter-13.html +430 -0
  6. data/doc/manual-html/chapter-2.html +45 -21
  7. data/doc/manual-html/chapter-3.html +45 -21
  8. data/doc/manual-html/chapter-4.html +45 -21
  9. data/doc/manual-html/chapter-5.html +45 -21
  10. data/doc/manual-html/chapter-6.html +49 -21
  11. data/doc/manual-html/chapter-7.html +45 -21
  12. data/doc/manual-html/chapter-8.html +66 -26
  13. data/doc/manual-html/chapter-9.html +48 -24
  14. data/doc/manual-html/index.html +54 -22
  15. data/doc/manual-html/manual.css +12 -0
  16. data/doc/manual-html/tutorial-1.html +45 -21
  17. data/doc/manual-html/tutorial-2.html +45 -21
  18. data/doc/manual-html/tutorial-3.html +45 -21
  19. data/doc/manual-html/tutorial-4.html +45 -21
  20. data/doc/manual-html/tutorial-5.html +45 -21
  21. data/doc/manual/manual.css +12 -0
  22. data/doc/manual/manual.rb +1 -1
  23. data/doc/manual/manual.yml +426 -20
  24. data/doc/packages/copland.html +41 -9
  25. data/doc/packages/copland.lib.html +36 -8
  26. data/doc/packages/copland.remote.html +46 -10
  27. data/doc/packages/copland.webrick.html +16 -65
  28. data/doc/packages/index.html +1 -1
  29. data/doc/presentation/copland.mgp +1083 -0
  30. data/doc/presentation/to_html.rb +52 -0
  31. data/lib/copland/configuration-point/common.rb +32 -1
  32. data/lib/copland/configuration/yaml/service-point.rb +10 -1
  33. data/lib/copland/log-factory.rb +28 -12
  34. data/lib/copland/logger.rb +155 -0
  35. data/lib/copland/models/singleton.rb +8 -2
  36. data/lib/copland/package.rb +32 -14
  37. data/lib/copland/service-point.rb +7 -0
  38. data/lib/copland/thread.rb +104 -0
  39. data/lib/copland/utils.rb +10 -3
  40. data/lib/copland/version.rb +2 -2
  41. data/test/configuration/yaml/tc_service-point-processor.rb +8 -0
  42. data/test/custom-logger.yml +2 -1
  43. data/test/impl/tc_logging-interceptor.rb +12 -12
  44. data/test/logger.yml +1 -1
  45. data/test/mock.rb +2 -0
  46. data/test/tc_logger.rb +19 -6
  47. data/test/tc_package.rb +25 -0
  48. data/test/tc_queryable-mutex.rb +75 -0
  49. data/test/tc_registry.rb +8 -4
  50. metadata +9 -2
@@ -14,8 +14,8 @@
14
14
  </div>
15
15
  </td><td valign='middle' align='right'>
16
16
  <div class="info">
17
- Copland Version: <strong>0.8.0</strong><br />
18
- Manual Last Updated: <strong>2004-09-27 03:37 GMT</strong>
17
+ Copland Version: <strong>1.0.0</strong><br />
18
+ Manual Last Updated: <strong>2004-10-12 02:22 GMT</strong>
19
19
  </div>
20
20
  </td></tr>
21
21
  </table>
@@ -39,13 +39,21 @@
39
39
 
40
40
  <li><a href="chapter-1.html#s1">What is Copland?</a></li>
41
41
 
42
- <li><a href="chapter-1.html#s2">Features</a></li>
42
+ <li><a href="chapter-1.html#s2">What Can Copland Do For Me?</a></li>
43
43
 
44
- <li><a href="chapter-1.html#s3">Getting Copland</a></li>
44
+ <li><a href="chapter-1.html#s3">Copland <em>sans</em> Buzzwords</a></li>
45
45
 
46
- <li><a href="chapter-1.html#s4">License Information</a></li>
46
+ <li><a href="chapter-1.html#s4">Copland <em>avec</em> Buzzwords</a></li>
47
47
 
48
- <li><a href="chapter-1.html#s5">Support</a></li>
48
+ <li><a href="chapter-1.html#s5">The Buzzwords Themselves</a></li>
49
+
50
+ <li><a href="chapter-1.html#s6">Features</a></li>
51
+
52
+ <li><a href="chapter-1.html#s7">Getting Copland</a></li>
53
+
54
+ <li><a href="chapter-1.html#s8">License Information</a></li>
55
+
56
+ <li><a href="chapter-1.html#s9">Support</a></li>
49
57
 
50
58
  </ol>
51
59
  </li>
@@ -149,7 +157,9 @@
149
157
 
150
158
  <li><a href="chapter-8.html#s1">Descriptor Syntax</a></li>
151
159
 
152
- <li><a href="chapter-8.html#s2">DefaultSymbolSource</a></li>
160
+ <li><a href="chapter-8.html#s2">FactoryDefaults</a></li>
161
+
162
+ <li><a href="chapter-8.html#s3">ApplicationDefaults</a></li>
153
163
 
154
164
  </ol>
155
165
  </li>
@@ -166,54 +176,68 @@
166
176
 
167
177
  <li>
168
178
  <a href="chapter-10.html">
179
+ Logging
180
+ </a>
181
+
182
+ <ol type="1">
183
+
184
+ <li><a href="chapter-10.html#s1">Log Factory</a></li>
185
+
186
+ <li><a href="chapter-10.html#s2">Configuration</a></li>
187
+
188
+ </ol>
189
+ </li>
190
+
191
+ <li>
192
+ <a href="chapter-11.html">
169
193
  Service Factories
170
194
  </a>
171
195
 
172
196
  <ol type="1">
173
197
 
174
- <li><a href="chapter-10.html#s1">Schemas</a></li>
198
+ <li><a href="chapter-11.html#s1">Schemas</a></li>
175
199
 
176
- <li><a href="chapter-10.html#s2">How do they work?</a></li>
200
+ <li><a href="chapter-11.html#s2">How do they work?</a></li>
177
201
 
178
- <li><a href="chapter-10.html#s3">BuilderFactory</a></li>
202
+ <li><a href="chapter-11.html#s3">BuilderFactory</a></li>
179
203
 
180
204
  </ol>
181
205
  </li>
182
206
 
183
207
  <li>
184
- <a href="chapter-11.html">
208
+ <a href="chapter-12.html">
185
209
  Schemas
186
210
  </a>
187
211
 
188
212
  <ol type="1">
189
213
 
190
- <li><a href="chapter-11.html#s1">Basic Format</a></li>
214
+ <li><a href="chapter-12.html#s1">Basic Format</a></li>
191
215
 
192
- <li><a href="chapter-11.html#s2">Subschemas</a></li>
216
+ <li><a href="chapter-12.html#s2">Subschemas</a></li>
193
217
 
194
- <li><a href="chapter-11.html#s3">Arrays</a></li>
218
+ <li><a href="chapter-12.html#s3">Arrays</a></li>
195
219
 
196
- <li><a href="chapter-11.html#s4">Named vs. Anonymous Schemas</a></li>
220
+ <li><a href="chapter-12.html#s4">Named vs. Anonymous Schemas</a></li>
197
221
 
198
- <li><a href="chapter-11.html#s5">Extending Schemas</a></li>
222
+ <li><a href="chapter-12.html#s5">Extending Schemas</a></li>
199
223
 
200
- <li><a href="chapter-11.html#s6">Limitations</a></li>
224
+ <li><a href="chapter-12.html#s6">Limitations</a></li>
201
225
 
202
226
  </ol>
203
227
  </li>
204
228
 
205
229
  <li>
206
- <a href="chapter-12.html">
230
+ <a href="chapter-13.html">
207
231
  Listeners and Event Producers
208
232
  </a>
209
233
 
210
234
  <ol type="1">
211
235
 
212
- <li><a href="chapter-12.html#s1">Event Producers</a></li>
236
+ <li><a href="chapter-13.html#s1">Event Producers</a></li>
213
237
 
214
- <li><a href="chapter-12.html#s2">Listeners</a></li>
238
+ <li><a href="chapter-13.html#s2">Listeners</a></li>
215
239
 
216
- <li><a href="chapter-12.html#s3">The Registry as an Event Producer</a></li>
240
+ <li><a href="chapter-13.html#s3">The Registry as an Event Producer</a></li>
217
241
 
218
242
  </ol>
219
243
  </li>
@@ -14,8 +14,8 @@
14
14
  </div>
15
15
  </td><td valign='middle' align='right'>
16
16
  <div class="info">
17
- Copland Version: <strong>0.8.0</strong><br />
18
- Manual Last Updated: <strong>2004-09-27 03:37 GMT</strong>
17
+ Copland Version: <strong>1.0.0</strong><br />
18
+ Manual Last Updated: <strong>2004-10-12 02:22 GMT</strong>
19
19
  </div>
20
20
  </td></tr>
21
21
  </table>
@@ -39,13 +39,21 @@
39
39
 
40
40
  <li><a href="chapter-1.html#s1">What is Copland?</a></li>
41
41
 
42
- <li><a href="chapter-1.html#s2">Features</a></li>
42
+ <li><a href="chapter-1.html#s2">What Can Copland Do For Me?</a></li>
43
43
 
44
- <li><a href="chapter-1.html#s3">Getting Copland</a></li>
44
+ <li><a href="chapter-1.html#s3">Copland <em>sans</em> Buzzwords</a></li>
45
45
 
46
- <li><a href="chapter-1.html#s4">License Information</a></li>
46
+ <li><a href="chapter-1.html#s4">Copland <em>avec</em> Buzzwords</a></li>
47
47
 
48
- <li><a href="chapter-1.html#s5">Support</a></li>
48
+ <li><a href="chapter-1.html#s5">The Buzzwords Themselves</a></li>
49
+
50
+ <li><a href="chapter-1.html#s6">Features</a></li>
51
+
52
+ <li><a href="chapter-1.html#s7">Getting Copland</a></li>
53
+
54
+ <li><a href="chapter-1.html#s8">License Information</a></li>
55
+
56
+ <li><a href="chapter-1.html#s9">Support</a></li>
49
57
 
50
58
  </ol>
51
59
  </li>
@@ -149,7 +157,9 @@
149
157
 
150
158
  <li><a href="chapter-8.html#s1">Descriptor Syntax</a></li>
151
159
 
152
- <li><a href="chapter-8.html#s2">DefaultSymbolSource</a></li>
160
+ <li><a href="chapter-8.html#s2">FactoryDefaults</a></li>
161
+
162
+ <li><a href="chapter-8.html#s3">ApplicationDefaults</a></li>
153
163
 
154
164
  </ol>
155
165
  </li>
@@ -166,54 +176,68 @@
166
176
 
167
177
  <li>
168
178
  <a href="chapter-10.html">
179
+ Logging
180
+ </a>
181
+
182
+ <ol type="1">
183
+
184
+ <li><a href="chapter-10.html#s1">Log Factory</a></li>
185
+
186
+ <li><a href="chapter-10.html#s2">Configuration</a></li>
187
+
188
+ </ol>
189
+ </li>
190
+
191
+ <li>
192
+ <a href="chapter-11.html">
169
193
  Service Factories
170
194
  </a>
171
195
 
172
196
  <ol type="1">
173
197
 
174
- <li><a href="chapter-10.html#s1">Schemas</a></li>
198
+ <li><a href="chapter-11.html#s1">Schemas</a></li>
175
199
 
176
- <li><a href="chapter-10.html#s2">How do they work?</a></li>
200
+ <li><a href="chapter-11.html#s2">How do they work?</a></li>
177
201
 
178
- <li><a href="chapter-10.html#s3">BuilderFactory</a></li>
202
+ <li><a href="chapter-11.html#s3">BuilderFactory</a></li>
179
203
 
180
204
  </ol>
181
205
  </li>
182
206
 
183
207
  <li>
184
- <a href="chapter-11.html">
208
+ <a href="chapter-12.html">
185
209
  Schemas
186
210
  </a>
187
211
 
188
212
  <ol type="1">
189
213
 
190
- <li><a href="chapter-11.html#s1">Basic Format</a></li>
214
+ <li><a href="chapter-12.html#s1">Basic Format</a></li>
191
215
 
192
- <li><a href="chapter-11.html#s2">Subschemas</a></li>
216
+ <li><a href="chapter-12.html#s2">Subschemas</a></li>
193
217
 
194
- <li><a href="chapter-11.html#s3">Arrays</a></li>
218
+ <li><a href="chapter-12.html#s3">Arrays</a></li>
195
219
 
196
- <li><a href="chapter-11.html#s4">Named vs. Anonymous Schemas</a></li>
220
+ <li><a href="chapter-12.html#s4">Named vs. Anonymous Schemas</a></li>
197
221
 
198
- <li><a href="chapter-11.html#s5">Extending Schemas</a></li>
222
+ <li><a href="chapter-12.html#s5">Extending Schemas</a></li>
199
223
 
200
- <li><a href="chapter-11.html#s6">Limitations</a></li>
224
+ <li><a href="chapter-12.html#s6">Limitations</a></li>
201
225
 
202
226
  </ol>
203
227
  </li>
204
228
 
205
229
  <li>
206
- <a href="chapter-12.html">
230
+ <a href="chapter-13.html">
207
231
  Listeners and Event Producers
208
232
  </a>
209
233
 
210
234
  <ol type="1">
211
235
 
212
- <li><a href="chapter-12.html#s1">Event Producers</a></li>
236
+ <li><a href="chapter-13.html#s1">Event Producers</a></li>
213
237
 
214
- <li><a href="chapter-12.html#s2">Listeners</a></li>
238
+ <li><a href="chapter-13.html#s2">Listeners</a></li>
215
239
 
216
- <li><a href="chapter-12.html#s3">The Registry as an Event Producer</a></li>
240
+ <li><a href="chapter-13.html#s3">The Registry as an Event Producer</a></li>
217
241
 
218
242
  </ol>
219
243
  </li>
@@ -341,24 +365,40 @@
341
365
 
342
366
  <h2>
343
367
  <a name="s2"></a>
344
- 8.2. DefaultSymbolSource
368
+ 8.2. FactoryDefaults
345
369
  </h2>
346
370
 
347
371
 
348
372
 
349
373
  <div class="section">
350
- <p>One of the core pre-defined configuration points is the map <code>copland.DefaultSymbolSource</code>. Although you will rarely access this configuration point directly, it is integrated tightly with Copland. Any value you add to it becomes available as a <em>substitution symbol</em>.</p>
374
+ <p>One of the core pre-defined configuration points is the map <code>copland.FactoryDefaults</code>. Although you will rarely access this configuration point directly, it is integrated tightly with Copland. Any value you add to it becomes available as a <em>substitution symbol</em>.</p>
351
375
 
352
- <p>Substitution symbols will look familiar to those of you coming from a Java background; utilities like <a href="http://ant.apache.org">ant</a> and <a href="http://maven.apache.org">maven</a> make heavy use of them. What they are, is this: any time Copland encounters a value that contains a certain pattern, it replaces that pattern with the value of the same name from the DefaultSymbolSource. The pattern is a dollar sign, followed by curly braces that contain the name of the symbol.</p>
376
+ <p>Substitution symbols will look familiar to those of you coming from a Java background; utilities like <a href="http://ant.apache.org">ant</a> and <a href="http://maven.apache.org">maven</a> make heavy use of them. What they are, is this: any time Copland encounters a value that contains a certain pattern, it replaces that pattern with the value of the same name from the FactoryDefaults. The pattern is a dollar sign, followed by curly braces that contain the name of the symbol.</p>
353
377
 
354
- <p>For example, suppose you want to allow the application to configure which class gets used when a particular service point is instantiated. You can do this by pulling the name of the class from the DefaultSymbolSource as a substitution symbol:</p>
378
+ <p>For example, suppose you want to allow the application to configure which class gets used when a particular service point is instantiated. You can do this by pulling the name of the class from the FactoryDefaults as a substitution symbol:</p>
355
379
 
356
380
  <pre>
357
381
  SomeServicePoint:
358
382
  implementor: ${the.class.to.use}
359
383
  </pre>
360
384
 
361
- <p>Then, the application would contribute a value named <code>the.class.to.use</code> to <code>copland.DefaultSymbolSource</code>, and when <code>SomeServicePoint</code> is instantiated, it would use the value thus provided.<br />
385
+ <p>Then, the application would contribute a value named <code>the.class.to.use</code> to <code>copland.FactoryDefaults</code>, and when <code>SomeServicePoint</code> is instantiated, it would use the value thus provided.<br />
386
+ </p>
387
+ </div>
388
+
389
+
390
+
391
+ <h2>
392
+ <a name="s3"></a>
393
+ 8.3. ApplicationDefaults
394
+ </h2>
395
+
396
+
397
+
398
+ <div class="section">
399
+ <p>The <code>copland.ApplicationDefaults</code> configuration point works together with the <code>FactoryDefaults</code> configuration point to provide a flexible way to override default values of substitution symbols.</p>
400
+
401
+ <p>When a substitution symbol is requested, the <code>ApplicationDefaults</code> configuration point is searched first. If the requested symbol is not found there, the <code>FactoryDefaults</code> configuration point is searched. This allows package developers to define default values (in <code>FactoryDefaults</code>), and allow clients of the packages to override those defaults as needed (in <code>ApplicationDefaults</code>).<br />
362
402
  </p>
363
403
  </div>
364
404
 
@@ -14,8 +14,8 @@
14
14
  </div>
15
15
  </td><td valign='middle' align='right'>
16
16
  <div class="info">
17
- Copland Version: <strong>0.8.0</strong><br />
18
- Manual Last Updated: <strong>2004-09-27 03:37 GMT</strong>
17
+ Copland Version: <strong>1.0.0</strong><br />
18
+ Manual Last Updated: <strong>2004-10-12 02:22 GMT</strong>
19
19
  </div>
20
20
  </td></tr>
21
21
  </table>
@@ -39,13 +39,21 @@
39
39
 
40
40
  <li><a href="chapter-1.html#s1">What is Copland?</a></li>
41
41
 
42
- <li><a href="chapter-1.html#s2">Features</a></li>
42
+ <li><a href="chapter-1.html#s2">What Can Copland Do For Me?</a></li>
43
43
 
44
- <li><a href="chapter-1.html#s3">Getting Copland</a></li>
44
+ <li><a href="chapter-1.html#s3">Copland <em>sans</em> Buzzwords</a></li>
45
45
 
46
- <li><a href="chapter-1.html#s4">License Information</a></li>
46
+ <li><a href="chapter-1.html#s4">Copland <em>avec</em> Buzzwords</a></li>
47
47
 
48
- <li><a href="chapter-1.html#s5">Support</a></li>
48
+ <li><a href="chapter-1.html#s5">The Buzzwords Themselves</a></li>
49
+
50
+ <li><a href="chapter-1.html#s6">Features</a></li>
51
+
52
+ <li><a href="chapter-1.html#s7">Getting Copland</a></li>
53
+
54
+ <li><a href="chapter-1.html#s8">License Information</a></li>
55
+
56
+ <li><a href="chapter-1.html#s9">Support</a></li>
49
57
 
50
58
  </ol>
51
59
  </li>
@@ -149,7 +157,9 @@
149
157
 
150
158
  <li><a href="chapter-8.html#s1">Descriptor Syntax</a></li>
151
159
 
152
- <li><a href="chapter-8.html#s2">DefaultSymbolSource</a></li>
160
+ <li><a href="chapter-8.html#s2">FactoryDefaults</a></li>
161
+
162
+ <li><a href="chapter-8.html#s3">ApplicationDefaults</a></li>
153
163
 
154
164
  </ol>
155
165
  </li>
@@ -166,54 +176,68 @@
166
176
 
167
177
  <li>
168
178
  <a href="chapter-10.html">
179
+ Logging
180
+ </a>
181
+
182
+ <ol type="1">
183
+
184
+ <li><a href="chapter-10.html#s1">Log Factory</a></li>
185
+
186
+ <li><a href="chapter-10.html#s2">Configuration</a></li>
187
+
188
+ </ol>
189
+ </li>
190
+
191
+ <li>
192
+ <a href="chapter-11.html">
169
193
  Service Factories
170
194
  </a>
171
195
 
172
196
  <ol type="1">
173
197
 
174
- <li><a href="chapter-10.html#s1">Schemas</a></li>
198
+ <li><a href="chapter-11.html#s1">Schemas</a></li>
175
199
 
176
- <li><a href="chapter-10.html#s2">How do they work?</a></li>
200
+ <li><a href="chapter-11.html#s2">How do they work?</a></li>
177
201
 
178
- <li><a href="chapter-10.html#s3">BuilderFactory</a></li>
202
+ <li><a href="chapter-11.html#s3">BuilderFactory</a></li>
179
203
 
180
204
  </ol>
181
205
  </li>
182
206
 
183
207
  <li>
184
- <a href="chapter-11.html">
208
+ <a href="chapter-12.html">
185
209
  Schemas
186
210
  </a>
187
211
 
188
212
  <ol type="1">
189
213
 
190
- <li><a href="chapter-11.html#s1">Basic Format</a></li>
214
+ <li><a href="chapter-12.html#s1">Basic Format</a></li>
191
215
 
192
- <li><a href="chapter-11.html#s2">Subschemas</a></li>
216
+ <li><a href="chapter-12.html#s2">Subschemas</a></li>
193
217
 
194
- <li><a href="chapter-11.html#s3">Arrays</a></li>
218
+ <li><a href="chapter-12.html#s3">Arrays</a></li>
195
219
 
196
- <li><a href="chapter-11.html#s4">Named vs. Anonymous Schemas</a></li>
220
+ <li><a href="chapter-12.html#s4">Named vs. Anonymous Schemas</a></li>
197
221
 
198
- <li><a href="chapter-11.html#s5">Extending Schemas</a></li>
222
+ <li><a href="chapter-12.html#s5">Extending Schemas</a></li>
199
223
 
200
- <li><a href="chapter-11.html#s6">Limitations</a></li>
224
+ <li><a href="chapter-12.html#s6">Limitations</a></li>
201
225
 
202
226
  </ol>
203
227
  </li>
204
228
 
205
229
  <li>
206
- <a href="chapter-12.html">
230
+ <a href="chapter-13.html">
207
231
  Listeners and Event Producers
208
232
  </a>
209
233
 
210
234
  <ol type="1">
211
235
 
212
- <li><a href="chapter-12.html#s1">Event Producers</a></li>
236
+ <li><a href="chapter-13.html#s1">Event Producers</a></li>
213
237
 
214
- <li><a href="chapter-12.html#s2">Listeners</a></li>
238
+ <li><a href="chapter-13.html#s2">Listeners</a></li>
215
239
 
216
- <li><a href="chapter-12.html#s3">The Registry as an Event Producer</a></li>
240
+ <li><a href="chapter-13.html#s3">The Registry as an Event Producer</a></li>
217
241
 
218
242
  </ol>
219
243
  </li>
@@ -300,16 +324,16 @@
300
324
 
301
325
  <p>Adding contributions is simple. All contributions must go in the <em>contributions</em> section of the package descriptor. Then, specify a map key with the name of the configuration point you want to contribute to, and then specify (as the value of the key) the value(s) you want to contribute.</p>
302
326
 
303
- <p>For example, to contribute a value to the DefaultSymbolSource configuration point:</p>
327
+ <p>For example, to contribute a value to the ApplicationDefaults configuration point:</p>
304
328
 
305
329
  <pre>
306
330
  contributions:
307
331
 
308
- copland.DefaultSymbolSource:
332
+ copland.ApplicationDefaults:
309
333
  user.name: fritz
310
334
  </pre>
311
335
 
312
- <p>That little snippet just added a value called <code>user.name</code> to the <code>copland.DefaultSymbolSource</code> configuration point!<br />
336
+ <p>That little snippet just added a value called <code>user.name</code> to the <code>copland.ApplicationDefaults</code> configuration point!<br />
313
337
  </p>
314
338
  </div>
315
339