public class BigQueryFileMessageHandler
extends org.springframework.integration.handler.AbstractReplyProducingMessageHandler
MessageHandler which handles sending and
loading files to a BigQuery table.messagingTemplateEXPRESSION_PARSER, logger| Constructor and Description |
|---|
BigQueryFileMessageHandler(BigQueryTemplate bigQueryTemplate) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInit() |
protected Object |
handleRequestMessage(org.springframework.messaging.Message<?> message) |
void |
setFormatOptions(FormatOptions formatOptions)
Sets the handler's
FormatOptions which describe the type/format of data files being
loaded. |
void |
setFormatOptionsExpression(org.springframework.expression.Expression formatOptionsExpression)
Sets the SpEL
Expression used to determine the FormatOptions for the handler. |
void |
setSync(boolean sync)
A
boolean indicating if the BigQueryFileMessageHandler should synchronously
wait for each file to be successfully loaded to BigQuery. |
void |
setTableName(String tableName)
Sets the BigQuery table name to use.
|
void |
setTableNameExpression(org.springframework.expression.Expression tableNameExpression)
Sets the SpEL
Expression to evaluate to determine the table name. |
void |
setTimeout(Duration timeout)
Sets the
Duration to wait for a file to be loaded into BigQuery before timing out
when waiting synchronously. |
doInvokeAdvisedRequestHandler, getBeanClassLoader, getIntegrationPatternType, getRequiresReply, handleMessageInternal, hasAdviceChain, onInit, setAdviceChain, setBeanClassLoader, setRequiresReplyaddNotPropagatedHeaders, createOutputMessage, getNotPropagatedHeaders, getOutputChannel, isAsync, messageBuilderForReply, produceOutput, resolveErrorChannel, sendErrorMessage, sendOutput, sendOutputs, setAsync, setNotPropagatedHeaders, setOutputChannel, setOutputChannelName, setSendTimeout, shouldCopyRequestHeaders, shouldSplitOutput, updateNotPropagatedHeadershandleMessage, onComplete, onError, onNext, onSubscribebuildSendTimer, configureMetrics, destroy, getActiveCount, getActiveCountLong, getComponentType, getDuration, getErrorCount, getErrorCountLong, getHandleCount, getHandleCountLong, getHandlerMetrics, getManagedName, getManagedType, getMaxDuration, getMeanDuration, getMetricsCaptor, getMinDuration, getOrder, getOverrides, getStandardDeviationDuration, isCountsEnabled, isLoggingEnabled, isStatsEnabled, registerMetricsCaptor, reset, sendTimer, setCountsEnabled, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, setStatsEnabled, shouldTrackafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic BigQueryFileMessageHandler(BigQueryTemplate bigQueryTemplate)
protected void doInit()
doInit in class org.springframework.integration.handler.AbstractReplyProducingMessageHandlerpublic void setTableNameExpression(org.springframework.expression.Expression tableNameExpression)
Expression to evaluate to determine the table name.tableNameExpression - the SpEL expression used to evaluate the table namepublic void setTableName(String tableName)
setTableNameExpression(org.springframework.expression.Expression).tableName - name of the BigQuery tablepublic void setFormatOptionsExpression(org.springframework.expression.Expression formatOptionsExpression)
Expression used to determine the FormatOptions for the handler.formatOptionsExpression - the SpEL expression used to evaluate the FormatOptionspublic void setFormatOptions(FormatOptions formatOptions)
FormatOptions which describe the type/format of data files being
loaded. This overwrites any previous settings made by setFormatOptionsExpression(org.springframework.expression.Expression).formatOptions - the format of the data file being loadedpublic void setTimeout(Duration timeout)
Duration to wait for a file to be loaded into BigQuery before timing out
when waiting synchronously.timeout - the Duration timeout to wait for a file to loadpublic void setSync(boolean sync)
boolean indicating if the BigQueryFileMessageHandler should synchronously
wait for each file to be successfully loaded to BigQuery.
If set to true, the handler runs synchronously and returns Job for message
responses. If set to false, the handler will return
ListenableFuture of the Job as the response
for each message.
sync - whether BigQueryFileMessageHandler should wait synchronously for jobs to
complete. Default is false (async).protected Object handleRequestMessage(org.springframework.messaging.Message<?> message)
handleRequestMessage in class org.springframework.integration.handler.AbstractReplyProducingMessageHandlerCopyright © 2020 Pivotal Software, Inc.. All rights reserved.