Class ByteStreamReadingMessageSource
java.lang.Object
org.springframework.integration.util.AbstractExpressionEvaluator
org.springframework.integration.endpoint.AbstractMessageSource<byte[]>
org.springframework.integration.stream.ByteStreamReadingMessageSource
- All Implemented Interfaces:
Aware,BeanFactoryAware,BeanNameAware,DisposableBean,InitializingBean,MessageSource<byte[]>,IntegrationPattern,NamedComponent,IntegrationInboundManagement,IntegrationManagement
public class ByteStreamReadingMessageSource extends AbstractMessageSource<byte[]>
A pollable source for receiving bytes from an
InputStream.- Author:
- Mark Fisher, Artem Bilan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.integration.support.management.IntegrationManagement
IntegrationManagement.ManagementOverrides -
Field Summary
Fields inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
EXPRESSION_PARSER, loggerFields inherited from interface org.springframework.integration.support.management.IntegrationManagement
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME -
Constructor Summary
Constructors Constructor Description ByteStreamReadingMessageSource(InputStream stream)ByteStreamReadingMessageSource(InputStream stream, int bufferSize) -
Method Summary
Modifier and Type Method Description protected byte[]doReceive()Subclasses must implement this method.StringgetComponentType()voidsetBytesPerMessage(int bytesPerMessage)voidsetShouldTruncate(boolean shouldTruncate)Methods inherited from class org.springframework.integration.endpoint.AbstractMessageSource
buildMessage, destroy, getBeanName, getComponentName, getManagedName, getManagedType, getOverrides, isLoggingEnabled, receive, registerMetricsCaptor, setBeanName, setHeaderExpressions, setLoggingEnabled, setManagedName, setManagedTypeMethods inherited from class org.springframework.integration.util.AbstractExpressionEvaluator
afterPropertiesSet, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, evaluateExpression, getBeanFactory, getEvaluationContext, getEvaluationContext, getMessageBuilderFactory, onInit, setBeanFactory, setConversionServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.integration.support.management.IntegrationManagement
getThisAsMethods inherited from interface org.springframework.integration.core.MessageSource
getIntegrationPatternType
-
Constructor Details
-
Method Details
-
setBytesPerMessage
public void setBytesPerMessage(int bytesPerMessage) -
setShouldTruncate
public void setShouldTruncate(boolean shouldTruncate) -
getComponentType
-
doReceive
protected byte[] doReceive()Description copied from class:AbstractMessageSourceSubclasses must implement this method. Typically the returned value will be thepayloadof type T, but the returned value may also be aMessageinstance whose payload is of type T; also can beAbstractIntegrationMessageBuilderwhich is used for additional headers population.- Specified by:
doReceivein classAbstractMessageSource<byte[]>- Returns:
- The value returned.
-