Interface Processor
-
Method Summary
Modifier and TypeMethodDescriptionvoid
process
(OperationList opList, OutputStream outputStream) void
void
setDecoder
(Decoder decoder) Will be called beforeprocess(is.galia.operation.OperationList, java.io.OutputStream)
.void
setEncoder
(Encoder encoder) Will be called beforeprocess(is.galia.operation.OperationList, java.io.OutputStream)
.
-
Method Details
-
setArena
- Parameters:
arena
- Instance in which to perform any native operations.
-
setDecoder
Will be called beforeprocess(is.galia.operation.OperationList, java.io.OutputStream)
.- Parameters:
decoder
- Instance from which to read the image.
-
setEncoder
Will be called beforeprocess(is.galia.operation.OperationList, java.io.OutputStream)
.- Parameters:
encoder
- Instance to which to write the image.
-
process
Reads the image from the
decoder
, performs the supplied operations on it, and writes the result to the supplied stream using theencoder
.Implementation notes:
- The
OperationList
will befrozen
. Implementations should not perform any operations other than the ones in the list, as this could cause problems with caching. Operation
s should be applied in the order they are iterated.- In addition to operations, the
OperationList
may containoptions
, which implementations should respect, where applicable. Option values may originate from theapplication configuration
, so implementations should not try to read the application configuration themselves, as this could also cause problems with caching. - The arguments should be assumed to all be valid. The provided
OutputStream
is likely going to write to the response, so it is already too late to e.g. render an error page.
- Parameters:
opList
- Operation list to process, which has already beenvalidated
.outputStream
- Stream to write the image to, which should not be closed.- Throws:
IOException
- if anything else goes wrong.
- The
-