An Assembly is a construction consisting of a chain of Transformer
elements; each wired in pre- or post- operational mode. This chain is
(always) terminated by one LoopbackTransformer
element.
Once constructed, and correctly initialized, the bulk of the methods available on the Assembly are delegated to the head of the Transformer chain of the Assembly.
The name of a property in the attributes map that is passed to the
init
method, representing the assembly's desired wiring direction. The mapped value should be a validDirection
value. If this attribute is omitted,Direction.FORWARD
is used.
Adds the designated Transformer t, to the head of the current chain, and signals that it should operate in pre-processing mode; i.e. it should apply its internal transformation algorithm on the input data stream, before it passes that stream to the next element in the chain. Throws an
IllegalArgumentException
if the designated Transformer has a non-null tail; i.e. it is already an element of a chain.
Adds the designated Transformer t, to the head of the current chain, and signals that it should operate in post-processing mode; i.e. it should apply its internal transformation algorithm on the input data stream, after it passes that stream to the next element in the chain. Throws an
IllegalArgumentException
if the designated Transformer has a non-null tail; i.e. it is already an element of a chain.
Initializes the Assembly for operation with specific characteristics, indicated by the designated attributes. The latter being a set of name-value pairs that describes the desired future behavior of this instance. Throws an
IllegalStateException
if the instance is already initialized.
Resets the Assembly for re-initialization and use with other characteristics. This method always succeeds.
Convenience method that calls the method with same name and three arguments, using a byte array of length
1
whose contents are the designated byte b. Returns the result of transformation. Throws anIllegalStateException
if the instance is not yet initialized. Throws anTransformerException
if a transformation-related exception occurs during the operation.
Convenience method that calls the same method with three arguments. All bytes in in, starting from index position 0 are considered. Returns the result of transformation. Throws an
IllegalStateException
if the instance is not yet initialized. Throws aTransformerException
if a transformation-related exception occurs during the operation.
Returns the result of processing a designated length bytes from a given in byte array, starting at position offset. Throws an
IllegalStateException
if the instance is not yet initialized. Throws anTransformerException
if a transformation-related exception occurs during the operation.
Convenience method that calls the same method with three arguments. A zero-long byte array is used. Returns the result of transformation. Throws an
IllegalStateException
if the instance is not yet initialized. Throws anTransformerException
if a transformation-related exception occurs during the operation.
Convenience method that calls the method with same name and three arguments, using a byte array of length
1
whose contents are the designated byte b. Returns the result of transformation. Throws anIllegalStateException
if the instance is not yet initialized. Throws anTransformerException
if a transformation-related exception occurs during the operation.
Convenience method that calls the same method with three arguments. All bytes in in, starting from index position
0
are considered. Returns the result of transformation. Throws anIllegalStateException
if the instance is not yet initialized. Throws anTransformerException
if a transformation-related exception occurs during the operation.
Returns the result of processing a designated length bytes from the given in byte array, starting at index position offset and signals, at the same time, that this is the last push operation on this Transformer. Throws an
IllegalStateException
if the instance is not yet initialized. Throws anTransformerException
if a transformation-related exception occurs during the operation.