Package de.elo.ix.client.devents
Class AbstractDocumentProcessor
java.lang.Object
de.elo.ix.client.devents.AbstractDocumentProcessor
- All Implemented Interfaces:
byps.Remote
,DocumentProcessor
,de.elo.utils.net.Remote
,Remote
This class helps to provide a document processor that modifies document related streams.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractDocumentProcessor
(IXConnection conn, UpDownloadEventInfo rwInfo) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract DocumentProcessor
The Subclass returns a document processor, if document stream shall be processed.abstract DocumentProcessor
The Subclass returns a document processor, if document stream shall be processed.protected ContentStream
createProcessingStream
(ContentStream originalStream) Initialize a ContentStream object used as return value inprocess(ContentStream)
.ensureRequiredMembers
(long requiredMembers) Ensure that the Sord inupDownloadInfo
contains the required members.getConn()
process
(ContentStream originalStream) Process the given stream.protected abstract void
processStream
(InputStream istream, OutputStream ostream) The Subclass processes the document stream.protected void
processStreamAsync
(ContentStream originalStream, ContentStream processingStream, PipedOutputStream pos)
-
Constructor Details
-
AbstractDocumentProcessor
Constructor.- Parameters:
conn
- IXConnectionrwInfo
- Parameters passed in upload or download event.
-
-
Method Details
-
beginDownload
The Subclass returns a document processor, if document stream shall be processed.- Returns:
DocumentProcessor
object (e.g. this) or null.- Throws:
byps.RemoteException
-
beginUpload
The Subclass returns a document processor, if document stream shall be processed.- Returns:
DocumentProcessor
object (e.g. this) or null.- Throws:
byps.RemoteException
-
processStream
The Subclass processes the document stream.- Parameters:
istream
- Read from this stream.ostream
- Write into this stream.- Throws:
IOException
-
createProcessingStream
Initialize a ContentStream object used as return value inprocess(ContentStream)
.- Parameters:
originalStream
- Originial stream passed inprocess(ContentStream)
- Returns:
- ContentStream as destination stream.
-
process
Description copied from interface:DocumentProcessor
Process the given stream.- Specified by:
process
in interfaceDocumentProcessor
- Parameters:
originalStream
- Stream to be processed.- Returns:
- Modified stream.
- Throws:
byps.RemoteException
-
getConn
-
getUpDownloadInfo
-
ensureRequiredMembers
Ensure that the Sord inupDownloadInfo
contains the required members. This function might create a new Sord object.- Parameters:
requiredMembers
- Required members.- Returns:
- Sord with required members.
- Throws:
byps.RemoteException
-
processStreamAsync
protected void processStreamAsync(ContentStream originalStream, ContentStream processingStream, PipedOutputStream pos) throws IOException - Throws:
IOException
-