Download Print this page

Developing A File Plug-In - Adobe 65024872 - InDesign CS4 - Mac Developer's Manual

Developer's guide
Hide thumbs Also See for 65024872 - InDesign CS4 - Mac:

Advertisement

*
Not supported before Flash Media Server 3

Developing a File plug-in

File plug-in overview
The File plug-in gives you complete control over where and how the server reads content from the file system. The
plug-in provides an interface between the operating system's file I/O mechanism and the server. You can configure
or modify the sample file to create an alternative to the default operating-system-based file system I/O.
Previous versions of the server supported synchronous access to the file system. Each request for a read operation
on a file had to wait for the previous requests in the queue to be completed. The File plug-in supports asynchronous
access, making it easier to implement network-based file I/O.
You can code the File plug-in to do the following:
Grab files from a remote location over HTTP and serve them to clients through the core server process to off-
load content management duties.
Remap files to a different physical location.
Note: The File plug-in only works with stream files. For a list of supported file formats, see "Supported file formats" in
Technical Overview.
If a custom File plug-in is not present or is inactive, the server uses the standard operating system file system for
backwards compatibility. You can only use one File plug-in.
Responding to server calls
The File plug-in is asynchronous—when the server calls the plug-in, the plug-in doesn't respond immediately. The
server calls the plug-in, and the plug-in calls the server back on the response interface.
When the server calls a method on the plug-in, the plug-in interface can return an error code (-1) indicating that the
operation failed. If the method returns an error, the plug-in should not call the server back.
If a call to the plug-in returns successfully, the plug-in should call the server back and pass the context received from
the server.
The
and
close()
remove()
methods on the plug-in, the server is not interested in the response. To free resources associated with the request
before the callback occurs, the server sometimes passes
necessary to call the server back. If the plug-in calls the server back with the
calls are an exception to this rule. When the server calls the
as the
pointer. If the context is
NULL
pCtx
NULL
ADOBE FLASH MEDIA INTERACTIVE SERVER
Plug-In Developer Guide
and
close()
remove()
, then it is not
NULL
context, the server ignores it.
15

Advertisement

loading

This manual is also suitable for:

Flash media interactive server