public interface PASContext
PASContext
contains information about the running process as
well as access to the services provided by PDF Automation Server.Modifier and Type | Method and Description |
---|---|
Payload |
createPayload(File file)
Creates a new
Payload with a File as the content. |
Payload |
createPayload(InputStream inStream,
String mimeType)
Creates a new
Payload with an InputStream as the content
with the given MIME type. |
File |
createTempFile(String prefix,
String suffix)
Creates an empty file in the default temporary-file directory, using the
given prefix and suffix to generate its name.
|
void |
log(Level level,
String message)
Logs a message to the PDF Server console.
|
void |
log(Level level,
String message,
Throwable t) |
File createTempFile(String prefix, String suffix) throws IOException
Message
after it has finished
processing.prefix
- The prefix string to be used in generating the file's name;
must be at least three characters longsuffix
- The suffix string to be used in generating the file's name;
may be null
, in which case the suffix
".tmp"
will be usedIllegalArgumentException
- If the prefix
argument contains fewer than three
charactersIOException
- If a file could not be createdSecurityException
- If a security manager exists and its SecurityManager.checkWrite(java.lang.String)
method does not allow a file to be createdcreatePayload(java.io.File)
,
Message.deriveMessage(Payload)
Payload createPayload(File file)
Payload
with a File
as the content. Use
this Payload
to derive a new Message
.file
- Payload
Message.deriveMessage(Payload)
Payload createPayload(InputStream inStream, String mimeType) throws IOException
Payload
with an InputStream
as the content
with the given MIME type. Use this Payload
to derive a new
Message
.inStream
- mimeType
- IOException
void log(Level level, String message)
level
- The level for the log messagemessage
- The content of the log message