Class AbstractMagicBytesTransmissionDecorator<DECORATEE extends Transmission>

    • Constructor Detail

      • AbstractMagicBytesTransmissionDecorator

        public AbstractMagicBytesTransmissionDecorator​(String aAlias,
                                                       DECORATEE aDecoratee,
                                                       TransmissionMetrics aTransmissionMetrics)
        Enriches the provided decoratee with magic bytes of the given length to be prefixed. The configuration attributes are taken from the TransmissionMetrics configuration object, though only those attributes are supported which are also supported by the other constructors!
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The decoratee which to be prefixed with magic bytes.
        aTransmissionMetrics - The TransmissionMetrics to be used for configuring this instance.
      • AbstractMagicBytesTransmissionDecorator

        public AbstractMagicBytesTransmissionDecorator​(String aAlias,
                                                       DECORATEE aDecoratee,
                                                       int aMagicBytesLength)
        Enriches the provided decoratee with magic bytes of the given length to be prefixed.
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The decoratee which to be prefixed with magic bytes.
        aMagicBytesLength - The length of the magic bytes sequence.
      • AbstractMagicBytesTransmissionDecorator

        public AbstractMagicBytesTransmissionDecorator​(String aAlias,
                                                       DECORATEE aDecoratee,
                                                       String aMagicBytes)
        Enriches the provided decoratee with magic bytes being prefixed (retrieved from the given String).
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The decoratee which to be prefixed with magic bytes.
        aMagicBytes - The String to be stored by this instance as magic bytes (uses the TransmissionMetrics.DEFAULT_ENCODING) for byte conversion).
      • AbstractMagicBytesTransmissionDecorator

        public AbstractMagicBytesTransmissionDecorator​(String aAlias,
                                                       DECORATEE aDecoratee,
                                                       String aMagicBytes,
                                                       Charset aCharset)
        Enriches the provided decoratee with magic bytes being prefixed (retrieved from the given String).
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The decoratee which to be prefixed with magic bytes.
        aMagicBytes - The String to be stored by this instance as magic bytes.
        aCharset - The Charset to use when converting the String to a byte array.
      • AbstractMagicBytesTransmissionDecorator

        public AbstractMagicBytesTransmissionDecorator​(String aAlias,
                                                       DECORATEE aDecoratee,
                                                       byte[] aMagicBytes)
        Enriches the provided decoratee with the given magic bytes being prefixed.
        Parameters:
        aAlias - The alias which identifies the content of this segment.
        aDecoratee - The decoratee which to be prefixed with magic bytes.
        aMagicBytes - The magic bytes to be prefixed.