@ComponentProfile(summary="MessageWrapper implementation wraps a metadata value as an Outputstream", since="3.10.1") public class MetadataStreamOutput extends java.lang.Object implements MessageWrapper<java.io.OutputStream>
MessageWrapper
implementation wraps a metadata value as an OutputStream
along with a ByteTranslator
This can be used in a functionally equivalent way to MetadataOutputStreamWrapper
and can be regarded as its replacement.
In the adapter configuration file this class is aliased as metadata-stream-output which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MetadataStreamOutput() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMetadataKey() |
ByteTranslator |
getTranslator() |
void |
setMetadataKey(java.lang.String key) |
void |
setTranslator(ByteTranslator t)
Set the translator that will give us bytes.
|
<T extends MetadataStreamOutput> |
withMetadataKey(java.lang.String e) |
<T extends MetadataStreamOutput> |
withTranslator(ByteTranslator s) |
java.io.OutputStream |
wrap(InterlokMessage m) |
public java.io.OutputStream wrap(InterlokMessage m) throws java.lang.Exception
wrap
in interface MessageWrapper<java.io.OutputStream>
java.lang.Exception
public java.lang.String getMetadataKey()
public void setMetadataKey(java.lang.String key)
public <T extends MetadataStreamOutput> T withMetadataKey(java.lang.String e)
public ByteTranslator getTranslator()
public void setTranslator(ByteTranslator t)
t
- public <T extends MetadataStreamOutput> T withTranslator(ByteTranslator s)