Source:
<code>public void send(final Message<?> message) { Assert.notNull(this.directoryExpressionProcessor, "'remoteDirectoryExpression' is required"); final StreamHolder inputStreamHolder = this.payloadToInputStream(message); if (inputStreamHolder != null) { this.execute(new SessionCallback<F, Object>() { @Override public Object doInSession(Session<F> session) throws IOException { String fileName = inputStreamHolder.getName(); try { String remoteDirectory = RemoteFileTemplate.this.directoryExpressionProcessor .processMessage(message); String temporaryRemoteDirectory = remoteDirectory; if (RemoteFileTemplate.this.temporaryDirectoryExpressionProcessor != null) { temporaryRemoteDirectory = RemoteFileTemplate.this.temporaryDirectoryExpressionProcessor .processMessage(message); } fileName = RemoteFileTemplate.this.fileNameGenerator.generateFileName(message); RemoteFileTemplate.this.sendFileToRemoteDirectory(inputStreamHolder.getStream(), temporaryRemoteDirectory, remoteDirectory, fileName, session); } catch (FileNotFoundException e) { throw new MessageDeliveryException(message, "File [" + inputStreamHolder.getName() + "] not found in local working directory; it was moved or deleted unexpectedly.", e); } catch (IOException e) { throw new MessageDeliveryException(message, "Failed to transfer file [" + inputStreamHolder.getName() + " -> " + fileName + "] from local directory to remote directory.", e); } catch (Exception e) { throw new MessageDeliveryException(message, "Error handling message for file [" + inputStreamHolder.getName() + " -> " + fileName + "]", e); } <START> return null; <END> } }); } else { if (logger.isWarnEnabled()) { logger.warn("File " + message.getPayload() + " does not exist"); } } }</code><technical_language>is need introduce SessionCallbackWithoutResult similar TransactionCallbackWithoutResult</technical_language>

Target:
public void send(final Message<?> message) { Assert.notNull(this.directoryExpressionProcessor, "'remoteDirectoryExpression' is required"); final StreamHolder inputStreamHolder = this.payloadToInputStream(message); if (inputStreamHolder != null) { this.execute(new SessionCallbackWithoutResult<F>() { @Override public void doInSessionWithoutResult(Session<F> session) throws IOException { String fileName = inputStreamHolder.getName(); try { String remoteDirectory = RemoteFileTemplate.this.directoryExpressionProcessor .processMessage(message); String temporaryRemoteDirectory = remoteDirectory; if (RemoteFileTemplate.this.temporaryDirectoryExpressionProcessor != null) { temporaryRemoteDirectory = RemoteFileTemplate.this.temporaryDirectoryExpressionProcessor .processMessage(message); } fileName = RemoteFileTemplate.this.fileNameGenerator.generateFileName(message); RemoteFileTemplate.this.sendFileToRemoteDirectory(inputStreamHolder.getStream(), temporaryRemoteDirectory, remoteDirectory, fileName, session); } catch (FileNotFoundException e) { throw new MessageDeliveryException(message, "File [" + inputStreamHolder.getName() + "] not found in local working directory; it was moved or deleted unexpectedly.", e); } catch (IOException e) { throw new MessageDeliveryException(message, "Failed to transfer file [" + inputStreamHolder.getName() + " -> " + fileName + "] from local directory to remote directory.", e); } catch (Exception e) { throw new MessageDeliveryException(message, "Error handling message for file [" + inputStreamHolder.getName() + " -> " + fileName + "]", e); } } }); } else { if (logger.isWarnEnabled()) { logger.warn("File " + message.getPayload() + " does not exist"); } } }