Publishing Engine Programmer's Guide > PTC Arbortext Publishing > Arbortext Publishing Engine Server Composer > The Server Composition Extension
  
The Server Composition Extension
A Server Composition Extension is a Java object that implements the interface com.arbortext.e3c.E3ServerCompositionExtension. The class is loaded, and an object is instantiated, by the PE Server Composer when the Server Composition Extension's class name is specified in the parameter e3.serverCompositionExtension.
A Server Composition Extension must be serially reusable. After it’s instantiated, it can perform any number of publishing operations. It is not required to be thread safe, as a single Arbortext PE sub-process can only perform one publishing operation at a time. However, because several Arbortext PE sub-processes could run separate instantiations of the same Server Composition Extension at the same time, developers should produce programs safe for multi-processing, following good programming practices such as using unique file names. Refer to Concurrency for more information.
The com.arbortext.e3c.E3ServerCompositionExtension interface specifies a single method, doCompose:
void doCompose(
E3ServerCompositionRequest request,
E3ServerCompositionResult result,
File sourceDir,
File targetDir,
Map jarMap,
PropertyMap propMap,
E3Tracer tracer
);
request
is an object into which the file index.xml from the source directory was loaded.
result
is the object to be returned to the client as result.xml.
sourceDir
is the directory where the input JAR file was restored.
targetDir
is the directory which will be compressed into a JAR file and returned to the client.
jarMap
is a map that translates JAR entry names in the input JAR to the absolute paths of the files in the source directory where each entry was restored.
propMap
is a map that contains the publishing parameters
tracer
used to write trace information