public class LexiComPipedOutputStream
extends java.io.PipedOutputStream
| Constructor and Description |
|---|
LexiComPipedOutputStream(java.io.File file,
java.util.Map map,
IMailboxController imc,
boolean deleteOnError)
Pipe an incoming payload file out through another mailbox
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes file and mailbox controller output streams.
|
protected boolean |
delete(java.io.File file) |
void |
flush()
Flushes file and mailbox controller output streams.
|
static java.util.concurrent.ExecutorService |
getExecutorService()
Get the service for executing the mailbox controller pipes
|
protected java.io.OutputStream |
getFileOutputStream(java.io.File file) |
java.lang.String |
getGeneralErrorMessage()
Get the error message to be logged by the receiving protocol thread if the IMailboxController send fails
|
void |
setGeneralErrorMessage(java.lang.String generalErrorMessage)
Set the error message to be logged by the receiving protocol thread if the IMailboxController send fails
|
void |
setIncludeMailboxControllerErrorMessage(boolean includeMailboxControllerErrorMessage)
Set whether the IMailboxController send error message should be included in the error message logged by the receiving protocol thread
|
void |
write(byte[] b)
Writes file and mailbox controller output streams.
|
void |
write(byte[] b,
int off,
int len)
Writes file and mailbox controller output streams.
|
void |
write(int b)
Writes file and mailbox controller output streams.
|
public LexiComPipedOutputStream(java.io.File file,
java.util.Map map,
IMailboxController imc,
boolean deleteOnError)
throws java.lang.Exception
file - original destination file which should still be writtenmap - original destination propertiesimc - IMailboxController to also pipe out the payloaddeleteOnError - true if the original destination file should be deleted if the IMailboxController send failsjava.lang.Exceptionpublic void setGeneralErrorMessage(java.lang.String generalErrorMessage)
generalErrorMessage - error message to be logged, which cannot be a null or empty string; defaults to "Error processing incoming file"public java.lang.String getGeneralErrorMessage()
public void setIncludeMailboxControllerErrorMessage(boolean includeMailboxControllerErrorMessage)
includeMailboxControllerErrorMessage - true if should include mailbox controller send error message; defaults to falsepublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.PipedOutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.PipedOutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.PipedOutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.PipedOutputStreamjava.io.IOExceptionpublic static java.util.concurrent.ExecutorService getExecutorService()
protected java.io.OutputStream getFileOutputStream(java.io.File file)
throws java.lang.Exception
java.lang.Exceptionprotected boolean delete(java.io.File file)
throws java.lang.Exception
java.lang.Exception