This file is indexed.

/usr/share/doc/red5/html/scripting.html is in red5-doc 1.0~svn4374-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title>Chapter&nbsp;14.&nbsp;Scripting Implementations</title><link rel="stylesheet" type="text/css" href="html.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Red5 - Reference Documentation"><link rel="up" href="core-components.html" title="Part&nbsp;II.&nbsp;Red5 Core Components"><link rel="prev" href="security.html" title="Chapter&nbsp;13.&nbsp;Security"><link rel="next" href="clustering.html" title="Chapter&nbsp;15.&nbsp;Clustering"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns="http://www.w3.org/TR/xhtml1/transitional" style="background-color:white;border:none;height:73px;border:1px solid black;"><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;" src="images/red5-banner.png"></img></a><a style="border:none;" href="http://osflash.org/red5" title="Red5 Open Source Flash Server"><img style="border:none;position:absolute;padding-top:5px;right:42px;" src="images/red5-banner-logo.png"></img></a></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="scripting"></a>Chapter&nbsp;14.&nbsp;Scripting Implementations</h2></div></div></div>
	
	<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e1957"></a>14.1.&nbsp;I. Select a scripting implementation</h2></div></div></div>
		
		<p>Level: Beginner </p>
		<p>Red5 includes interpreters for the following scripting languages: </p>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Javascript - version 1.6 (Mozilla Rhino version 1.6 R7) </p>
			</li><li class="listitem">
				<p>JRuby - version 1.0.1 (Ruby version 1.8.5) </p>
			</li><li class="listitem">
				<p>Jython - version 2.2 (Python version 2.1) </p>
			</li><li class="listitem">
				<p>Groovy - version 1.0 </p>
			</li><li class="listitem">
				<p>Beanshell - version 2.0b4 </p>
			</li></ul></div>
		<p>Future versions may include: </p>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>JudoScript </p>
			</li><li class="listitem">
				<p>Scala </p>
			</li><li class="listitem">
				<p>PHP (This one is non-trivial, I may just provide a bridge) </p>
			</li><li class="listitem">
				<p>Actionscript (Maybe SSAS) </p>
			</li></ul></div>
		<p>The scripting implementation classes are pre-specified in the following locations depending 
			upon your Java version: </p>
		<div class="literallayout"><p><br>
Java5&nbsp;-&nbsp;js-engine.jar,&nbsp;jython-engine.jar,&nbsp;groovy-engine.jar&nbsp;<br>
Java6&nbsp;-&nbsp;resources.jar&nbsp;<br>
</p></div>
		<p>File location: /META-INF/services/javax.script.ScriptEngineFactory </p>
		<p>It is most likely that the classes read from the jdk or jre will be prefered over any specified 
			elsewhere. </p>
	</div>
	<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e1986"></a>14.2.&nbsp;II. Configuring Spring</h2></div></div></div>
		
		<p>Level: Intermediate </p>
		<p>Step one is to locate your web applications red5-web.xml file. Within the xml config file the 
			web.scope bean definition must supply a web.handler, this handler is your Red5 application 
			(An application must extend the org.red5.server.adapter.ApplicationAdapter class). </p>
		<p>The application provides access to the Red5 server and any service instances that are 
			created. The service instances and the application itself may be scripted. Bean definitions 
			in Spring config files may not have the same id, here are some web handler definition 
			examples:</p>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Java class implementation </p>
			</li></ul></div>
		<pre class="programlisting">


&lt;bean id="web.handler" class="org.red5.server.webapp.oflaDemo.MultiThreadedApplicationAdapter" /&gt; 

</pre>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Javascript implementation </p>
			</li></ul></div>
		<pre class="programlisting">


&lt;bean id="web.handler" class="org.red5.server.script.rhino.RhinoScriptFactory"&gt; 
  &lt;constructor-arg index="0" value="classpath:applications/main.js"/&gt; 
  &lt;constructor-arg index="1"&gt; 
    &lt;list&gt; 
     &lt;value&gt;org.red5.server.api.IScopeHandler&lt;/value&gt; 
     &lt;value&gt;org.red5.server.adapter.IApplication&lt;/value&gt; 
    &lt;/list&gt; 
&lt;/constructor-arg&gt; 
&lt;constructor-arg index="2"&gt; 
 &lt;value&gt;org.red5.server.adapter.ApplicationAdapter&lt;/value&gt; 
&lt;/constructor-arg&gt; 
&lt;/bean&gt; 

</pre>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Ruby implementation </p>
			</li></ul></div>
		<pre class="programlisting">


&lt;bean id="web.handler" class="org.springframework.scripting.jruby.JRubyScriptFactory"&gt; 
&lt;constructor-arg index="0" value="classpath:applications/main.rb"/&gt; 
&lt;constructor-arg index="1"&gt; 
 &lt;list&gt; 
  &lt;value&gt;org.red5.server.api.IScopeHandler&lt;/value&gt; 
  &lt;value&gt;org.red5.server.adapter.IApplication&lt;/value&gt; 
 &lt;/list&gt; 
&lt;/constructor-arg&gt; 
&lt;/bean&gt; 

</pre>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Groovy implementation </p>
			</li></ul></div>
		<pre class="programlisting">


&lt;bean id="web.handler" class="org.red5.server.script.groovy.GroovyScriptFactory"&gt; 
&lt;constructor-arg index="0" value="classpath:applications/main.groovy"/&gt; 
&lt;constructor-arg index="1"&gt; 
 &lt;list&gt; 
  &lt;value&gt;org.red5.server.api.IScopeHandler&lt;/value&gt; 
  &lt;value&gt;org.red5.server.adapter.IApplication&lt;/value&gt; 
 &lt;/list&gt; 
&lt;/constructor-arg&gt; 
&lt;/bean&gt; 

</pre>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Python implementation </p>
			</li></ul></div>
		<pre class="programlisting">


Red5 Open Source 
Flash Server (0.7.1) 51 
&lt;bean id="web.handler" class="org.red5.server.script.jython.JythonScriptFactory"&gt; 
 &lt;constructor-arg index="0" value="classpath:applications/main.py"/&gt; 
 &lt;constructor-arg index="1"&gt; 
  &lt;list&gt; 
      &lt;value&gt;org.red5.server.api.IScopeHandler&lt;/value&gt; 
      &lt;value&gt;org.red5.server.adapter.IApplication&lt;/value&gt;
Scripting Implementations 
  &lt;/list&gt; 
 &lt;/constructor-arg&gt; 
        &lt;constructor-arg index="2"&gt; 
  &lt;list&gt; 
            &lt;value&gt;One&lt;/value&gt; 
            &lt;value&gt;2&lt;/value&gt; 
            &lt;value&gt;III&lt;/value&gt; 
        &lt;/list&gt; 
    &lt;/constructor-arg&gt; 
&lt;/bean&gt; 

</pre>
		<p>In general the configuration using scripted classes is defined using the constructor 
			arguments (see interpreter section) in the following order: </p>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Argument 1 - Location of the script source file </p>
			</li><li class="listitem">
				<p>Argument 2 - Java interfaces implemented by the script.</p>
			</li></ul></div>
		<p> The interfaces for the code which extends an Application are basically boilerplate 
			as seen in the examples above; You do not have to use those interfaces in all your 
			script definitions. </p>
		<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p>Argument 3 - Java classes extended by the script.</p>
			</li></ul></div>
		<p> The extended class is not always necessary, it depends upon the scripting engine 
			implementation. </p>
		<p>The example location starts with classpath:applications which in physical disk terms for the 
			"oflaDemo" application equates to webapps/oflaDemo/WEB-INF/applications </p>
	</div>
	<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2023"></a>14.3.&nbsp;III. Creating an application script</h2></div></div></div>
		
		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d5e2025"></a>14.3.1.&nbsp;1. Application adapter</h3></div></div></div>
			
			<p>Scripting an application adapter is more difficult in some languages than it is in others, 
				because of this I present the Ruby example which works really well and is easy to write and 
				integrate. The application services are easily written in any of the supported languages, but 
				they require a Java interface at a minimum. </p>
			<p> i. JRuby application adapter implementation </p>
			<div class="literallayout"><p><br>
#&nbsp;JRuby&nbsp;<br>
require&nbsp;'java'&nbsp;<br>
module&nbsp;RedFive&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;include_package&nbsp;"org.red5.server.api"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;include_package&nbsp;"org.red5.server.api.stream"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;include_package&nbsp;"org.red5.server.api.stream.support"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;include_package&nbsp;"org.red5.server.adapter"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;include_package&nbsp;"org.red5.server.stream"&nbsp;<br>
end&nbsp;<br>
#&nbsp;<br>
#&nbsp;application.rb&nbsp;-&nbsp;a&nbsp;translation&nbsp;into&nbsp;Ruby&nbsp;of&nbsp;the&nbsp;ofla&nbsp;demo&nbsp;application,&nbsp;a&nbsp;red5&nbsp;example.&nbsp;<br>
#&nbsp;<br>
#&nbsp;@author&nbsp;Paul&nbsp;Gregoire&nbsp;<br>
#<br>
class&nbsp;Application&nbsp;&amp;lt;&nbsp;RedFive::ApplicationAdapter&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;attr_reader&nbsp;:appScope,&nbsp;:serverStream&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attr_writer&nbsp;:appScope,&nbsp;:serverStream&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;initialize&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#call&nbsp;super&nbsp;to&nbsp;init&nbsp;the&nbsp;superclass,&nbsp;in&nbsp;this&nbsp;case&nbsp;a&nbsp;Java&nbsp;class&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;"Initializing&nbsp;ruby&nbsp;application"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;appStart(app)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;"Ruby&nbsp;appStart"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@appScope&nbsp;=&nbsp;app&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;true&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;appConnect(conn,&nbsp;params)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;"Ruby&nbsp;appConnect"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;measureBandwidth(conn)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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bsp;&nbsp;&nbsp;&nbsp;@serverStream.close&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;toString&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;"Ruby&nbsp;toString"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;setScriptContext(scriptContext)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;"Ruby&nbsp;application&nbsp;setScriptContext"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;method_missing(m,&nbsp;*args)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super&nbsp;unless&nbsp;@value.respond_to?(m)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;@value.send(m,&nbsp;*args)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
end&nbsp;&nbsp;&nbsp;<br>
<br>
</p></div>
		</div>
		<div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="d5e2030"></a>14.3.2.&nbsp;2. Application services</h3></div></div></div>
			
			<p>Here is an example of a Java interface (Yes, the methods are supposed to be empty) which 
				is used in the examples to provide a template for applications which will gather a list of files 
				and return them as a "Map" (key-value pairs) to the caller.</p>
			<p> i. Simple Java interface for implementation by scripts</p>
			<pre class="programlisting">


package org.red5.server.webapp.oflaDemo; 
             
import java.util.Map; 
public interface IDemoService { 
        /** 
     * Getter for property 'listOfAvailableFLVs'. 
     * 
     * @return Value for property 'listOfAvailableFLVs'. 
     */ 
    public Map getListOfAvailableFLVs(); 
    public Map getListOfAvailableFLVs(String string); 
} 

</pre>
			<p> ii. Spring bean definition for a script implementation of the interface</p>
			<pre class="programlisting">


&lt;bean id="demoService.service" class="org.springframework.scripting.jruby.JRubyScriptFactory"&gt; 
   &lt;constructor-arg index="0" value="classpath:applications/demoservice.rb"/&gt; 
   &lt;constructor-arg index="1"&gt; 
      &lt;list&gt; 
         &lt;value&gt;org.red5.server.webapp.oflaDemo.IDemoService&lt;/value&gt; 
      &lt;/list&gt; 
   &lt;/constructor-arg&gt; 
&lt;/bean&gt; 

</pre>
			<p> iii.JRuby script implementing the interface </p>
			<div class="literallayout"><p><br>
#&nbsp;JRuby&nbsp;-&nbsp;style&nbsp;<br>
require&nbsp;'java'&nbsp;<br>
module&nbsp;RedFive&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;include_package&nbsp;"org.springframework.core.io"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;include_package&nbsp;"org.red5.server.webapp.oflaDemo"&nbsp;<br>
end&nbsp;<br>
include_class&nbsp;"org.red5.server.api.Red5"&nbsp;<br>
include_class&nbsp;"java.util.HashMap"&nbsp;<br>
#&nbsp;<br>
#&nbsp;demoservice.rb&nbsp;-&nbsp;a&nbsp;translation&nbsp;into&nbsp;Ruby&nbsp;of&nbsp;the&nbsp;ofla&nbsp;demo&nbsp;application,&nbsp;a&nbsp;red5&nbsp;example.&nbsp;<br>
#&nbsp;<br>
#&nbsp;@author&nbsp;Paul&nbsp;Gregoire&nbsp;<br>
#&nbsp;<br>
class&nbsp;DemoService&nbsp;&amp;lt;&nbsp;RedFive::DemoServiceImpl&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;attr_reader&nbsp;:filesMap&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;attr_writer&nbsp;:filesMap&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;initialize&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;"Initializing&nbsp;ruby&nbsp;demoservice"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@filesMap&nbsp;=&nbsp;HashMap.new&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end<br>
&nbsp;def&nbsp;getListOfAvailableFLVs&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;puts&nbsp;"Getting&nbsp;the&nbsp;FLV&nbsp;files"&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;begin&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dirname&nbsp;=&nbsp;File.expand_path('webapps/oflaDemo/streams').to_s&nbsp;<br>
&nbsp;&nbsp;&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&nbsp;&nbsp;&nbsp;puts&nbsp;caller.join("\n");&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;filesMap&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;formatDate(date)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;date.strftime("%d/%m/%Y&nbsp;%I:%M:%S")&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;method_missing(m,&nbsp;*args)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super&nbsp;unless&nbsp;@value.respond_to?(m)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;@value.send(m,&nbsp;*args)&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;end&nbsp;<br>
end&nbsp;<br>
<br>
</p></div>
			<p> iv.Java application implementing the interface, upon which the Ruby code was based (This 
				code is NOT needed when using the script) </p>
			<pre class="programlisting">


package org.red5.server.webapp.oflaDemo; 
import java.io.File; 
import java.io.IOException; 
import java.text.SimpleDateFormat; 
import java.util.Date; 
import java.util.HashMap; 
import java.util.Locale; 
import java.util.Map; 
import org.apache.commons.logging.Log; 
import org.apache.commons.logging.LogFactory; 
import org.red5.server.api.IScope; 
import org.red5.server.api.Red5; 
import org.springframework.core.io.Resource; 
public class DemoService { 
        protected static Log log = LogFactory.getLog(DemoService.class.getName()); 

 /** 
     * Getter for property 'listOfAvailableFLVs'.
Scripting Implementations 
     * 
     * @return Value for property 'listOfAvailableFLVs'. 
     */ 
    public Map getListOfAvailableFLVs() { 
                IScope scope = Red5.getConnectionLocal().getScope(); 
                Map&amp;lt;String, Map&amp;gt; filesMap = new HashMap&amp;lt;String, Map&amp;gt;(); 
                Map&amp;lt;String, Object&amp;gt; fileInfo; 
                try { 
                        log.debug("getting the FLV files"); 
                        Resource[] flvs = scope.getResources("streams/*.flv"); 
                        if (flvs != null) { 
                                for (Resource flv : flvs) { 
                                        File file = flv.getFile(); 
                                        Date lastModifiedDate = new Date(file.lastModified()); 
                                        String lastModified = formatDate(lastModifiedDate); 
                                        String flvName = flv.getFile().getName(); 
                                        String flvBytes = Long.toString(file.length()); 
                                        if (log.isDebugEnabled()) { 
                                                log.debug("flvName: " + flvName); 
                                                log.debug("lastModified date: " + lastModified); 
                                                log.debug("flvBytes: " + flvBytes); 
                                                log.debug("-------"); 
                                        } 
                                        fileInfo = new HashMap&amp;lt;String, Object&amp;gt;(); 
                                        fileInfo.put("name", flvName); 
                                        fileInfo.put("lastModified", lastModified); 
                                        fileInfo.put("size", flvBytes); 
                                        filesMap.put(flvName, fileInfo); 
                                } 
} 
                        Resource[] mp3s = scope.getResources("streams/*.mp3"); 
                        if (mp3s != null) { 
                                for (Resource mp3 : mp3s) { 
                                        File file = mp3.getFile(); 
                                        Date lastModifiedDate = new Date(file.lastModified()); 
                                        String lastModified = formatDate(lastModifiedDate); 
                                        String flvName = mp3.getFile().getName(); 
                                        String flvBytes = Long.toString(file.length()); 
                                        if (log.isDebugEnabled()) { 
                                                log.debug("flvName: " + flvName); 
                                                log.debug("lastModified date: " + lastModified); 
                                                log.debug("flvBytes: " + flvBytes); 
                                                log.debug("-------"); 
                                        } 
                                        fileInfo = new HashMap&amp;lt;String, Object&amp;gt;(); 
                                        fileInfo.put("name", flvName); 
                                        fileInfo.put("lastModified", lastModified); 
                                        fileInfo.put("size", flvBytes); 
                                        filesMap.put(flvName, fileInfo); 
                                } 
                        } 
                } catch (IOException e) { 
                        log.error(e); 
                } 
                return filesMap; 
        } 
        
        private String formatDate(Date date) { 
                SimpleDateFormat formatter; 
                String pattern = "dd/MM/yy H:mm:ss"; 
                Locale locale = new Locale("en", "US"); 
                formatter = new SimpleDateFormat(pattern, locale); 
                return formatter.format(date); 
        } 
}   

</pre>
			<p> v. Flex AS3 method calling the service </p>
			<div class="literallayout"><p><br>
[Bindable]&nbsp;<br>
public&nbsp;var&nbsp;videoList:ArrayCollection;&nbsp;<br>
public&nbsp;function&nbsp;catchVideos():void{&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;call&nbsp;server-side&nbsp;method&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;create&nbsp;a&nbsp;responder&nbsp;and&nbsp;set&nbsp;it&nbsp;to&nbsp;getMediaList&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;nc_responder:Responder&nbsp;=&nbsp;new&nbsp;Responder(getMediaList,&nbsp;null);&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;call&nbsp;the&nbsp;server&nbsp;side&nbsp;method&nbsp;to&nbsp;get&nbsp;list&nbsp;of&nbsp;FLV's&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nc.call("demoService.getListOfAvailableFLVs",&nbsp;nc_responder);&nbsp;<br>
}&nbsp;<br>
public&nbsp;function&nbsp;getMediaList(list:Object):void{&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;this&nbsp;is&nbsp;the&nbsp;result&nbsp;of&nbsp;the&nbsp;server&nbsp;side&nbsp;getListOfAvailableFLVs&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;mediaList:Array&nbsp;=&nbsp;new&nbsp;Array();&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for(var&nbsp;items:String&nbsp;in&nbsp;list){&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mediaList.push({label:items,&nbsp;size:list[items].size,&nbsp;dateModified:list[items].lastModifi&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;videoList&nbsp;is&nbsp;bindable&nbsp;and&nbsp;the&nbsp;datagrid&nbsp;is&nbsp;set&nbsp;to&nbsp;use&nbsp;this&nbsp;for&nbsp;it's&nbsp;dataprovider&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;wrap&nbsp;it&nbsp;in&nbsp;an&nbsp;ArrayCollection&nbsp;first&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;videoList&nbsp;=&nbsp;new&nbsp;ArrayCollection(mediaList);&nbsp;<br>
}&nbsp;<br>
</p></div>
		</div>
	</div>
	<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2043"></a>14.4.&nbsp;Creating your own interpreter</h2></div></div></div>
		
		<p>Level: Advanced </p>
		<p>Lets just open this up by saying that I attempted to build an interpreter for PHP this last 
			weekend 02/2007 and it was a real pain; after four hours I had to give up. So what I learned 
			from this is that you must first identify scripting languages which operate as applications, 
			not as http request processors. Heres a test: Can X language be compiled into an 
			executable or be run on the command-line? If yes then it should be trivial to integrate. </p>
	</div>
	<div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d5e2047"></a>14.5.&nbsp;Links with scripting information</h2></div></div></div>
		
		<div class="itemizedlist"><p class="title"><b>Spring scripting</b></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
				<p><a class="ulink" href="http://static.springframework.org/spring/docs/2.0.x/reference/dynamic-language.html" target="_top">http://static.springframework.org/spring/docs/2.0.x/reference/dynamic-language.html</a></p>
			</li><li class="listitem">
				<p><a class="ulink" href="http://rhinoinspring.sourceforge.net/" target="_top">http://rhinoinspring.sourceforge.net/</a></p>
			</li></ul></div>
		<div class="itemizedlist"><p class="title"><b>Java scripting</b></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/" target="_top">http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/</a></p></li><li class="listitem"><p><a class="ulink" href="http://blogs.sun.com/sundararajan/" target="_top">http://blogs.sun.com/sundararajan/</a></p></li><li class="listitem"><p><a class="ulink" href="https://scripting.dev.java.net/" target="_top">https://scripting.dev.java.net/</a></p></li><li class="listitem"><p><a class="ulink" href="http://today.java.net/pub/a/today/2006/04/11/scripting-for-java-platform.html" target="_top">http://today.java.net/pub/a/today/2006/04/11/scripting-for-java-platform.html</a></p></li><li class="listitem"><p><a class="ulink" href="http://www.javaworld.com/javaworld/jw-03-2005/jw-0314-scripting_p.html" target="_top">http://www.javaworld.com/javaworld/jw-03-2005/jw-0314-scripting_p.html</a></p></li><li class="listitem"><p><a class="ulink" href="http://www.oreillynet.com/onjava/blog/2004/01/java_scripting_half_the_size_h.html" target="_top">http://www.oreillynet.com/onjava/blog/2004/01/java_scripting_half_the_size_h.html</a></p></li><li class="listitem"><p><a class="ulink" href="http://www.robert-tolksdorf.de/vmlanguages.html" target="_top">http://www.robert-tolksdorf.de/vmlanguages.html</a></p></li></ul></div>
		<div class="itemizedlist"><p class="title"><b>Javascript</b></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="http://www.mozilla.org/rhino/" target="_top">http://www.mozilla.org/rhino/</a></p></li><li class="listitem"><p><a class="ulink" href="http://www.mozilla.org/rhino/ScriptingJava.html" target="_top">http://www.mozilla.org/rhino/ScriptingJava.html</a></p></li></ul></div>
		<div class="itemizedlist"><p class="title"><b>Ruby</b></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="http://jruby.codehaus.org/" target="_top">http://jruby.codehaus.org/</a> </p></li></ul></div>
		<div class="itemizedlist"><p class="title"><b>BeanShell</b></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="http://www.beanshell.org/" target="_top">http://www.beanshell.org/</a> </p></li></ul></div>
		<div class="itemizedlist"><p class="title"><b>Python</b></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="http://www.jython.org/Project/" target="_top">http://www.jython.org/Project/</a></p></li><li class="listitem"><p><a class="ulink" href="http://www.onjava.com/pub/a/onjava/2002/03/27/jython.html" target="_top">http://www.onjava.com/pub/a/onjava/2002/03/27/jython.html</a></p></li><li class="listitem"><p><a class="ulink" href="http://jepp.sourceforge.net/" target="_top">http://jepp.sourceforge.net/</a></p></li><li class="listitem"><p><a class="ulink" href="http://jpe.sourceforge.net/" target="_top">http://jpe.sourceforge.net/</a></p></li><li class="listitem"><p><a class="ulink" href="http://jpype.sourceforge.net/" target="_top">http://jpype.sourceforge.net/</a></p></li></ul></div>
		<div class="itemizedlist"><p class="title"><b>Groovy</b></p><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="http://groovy.codehaus.org/" target="_top">http://groovy.codehaus.org/</a></p></li></ul></div>
	</div>
</div><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navfooter"><hr></hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="security.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="clustering.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&nbsp;13.&nbsp;Security&nbsp;</td><td width="20%" align="center"><span style="color:white;font-size:90%;"><a href="http://osflash.org/red5" title="Red5">Red5 Open Source Flash Server</a></span></td><td width="40%" align="right" valign="top">&nbsp;Chapter&nbsp;15.&nbsp;Clustering</td></tr></table></div></body></html>