public class GhostscriptTransformer extends AbstractTransformer
Constructor and Description |
---|
GhostscriptTransformer() |
Modifier and Type | Method and Description |
---|---|
void |
init()
Initializes the ThreadPoolExecutor if necessary.
|
void |
setCommandSuffix(java.lang.String commandSuffix) |
void |
setGhostscriptDebugMode(boolean ghostscriptDebugMode) |
void |
setGhostscriptOptions(java.lang.String ghostscriptOptions) |
void |
setGhostscriptPath(java.lang.String ghostscriptPath) |
void |
setGhostScriptThreadKillAfter(java.lang.String ghostScriptThreadKillAfter) |
void |
setGhostScriptThreadTimeout(java.lang.String ghostScriptThreadTimeout) |
void |
setGhostscriptUseTempFiles(boolean ghostscriptUseTempFiles) |
void |
setMaxQueueSize(int queueSize) |
void |
setMaxThreadCount(int threadcount) |
void |
setThreadKeepAliveTime(int keepAliveTime) |
boolean |
supportsAsynchronous()
Returns true if the transformer is capible of performing its transformations in an aysnchronous manner, false if the
transformer is synchronous.
|
java.lang.String |
transformAsync(java.lang.String ticket,
java.io.InputStream content,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Transform the content of the byte[] passed in with the sourceMimeType into the targetMimeType.
|
void |
transformSync(java.lang.String ticket,
java.io.InputStream content,
java.io.OutputStream output,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions tOptions)
Transforms the given byte[] of content (with the given 'sourceMimeType') into the targetMimeType with the given arguments.
|
getAsyncTransformedContent, isTransformable, setSupportedSourceMimetypes, setSupportedTargetMimetypes
public void init()
public void transformSync(java.lang.String ticket, java.io.InputStream content, java.io.OutputStream output, java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions tOptions)
Transformer
transformSync
in interface Transformer
transformSync
in class AbstractTransformer
ticket
- A valid OC ticket.content
- A byte[] containing the content to transform.sourceMimetype
- The mimetype of the content that is being transformed.targetMimetype
- The mimetype that the transformed content should be.tOptions
- The TransformationOptions
to use for transforming the content.public boolean supportsAsynchronous()
Transformer
supportsAsynchronous
in interface Transformer
supportsAsynchronous
in class AbstractTransformer
public java.lang.String transformAsync(java.lang.String ticket, java.io.InputStream content, java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
Transformer
ITransformation#transform(String, byte[], String, String, TransformationOptions)
method. For proper functionality an asynchronous transformer must be configured for use. Callers of this method are responsible for
pulling the content from this URL on their own, as nothing is done with the content.transformAsync
in interface Transformer
transformAsync
in class AbstractTransformer
public void setGhostscriptPath(java.lang.String ghostscriptPath)
public void setCommandSuffix(java.lang.String commandSuffix)
public void setGhostscriptOptions(java.lang.String ghostscriptOptions)
public void setGhostscriptDebugMode(boolean ghostscriptDebugMode)
public void setGhostscriptUseTempFiles(boolean ghostscriptUseTempFiles)
public void setMaxThreadCount(int threadcount)
public void setMaxQueueSize(int queueSize)
public void setThreadKeepAliveTime(int keepAliveTime)
public void setGhostScriptThreadKillAfter(java.lang.String ghostScriptThreadKillAfter)
public void setGhostScriptThreadTimeout(java.lang.String ghostScriptThreadTimeout)