org.springframework.integration.adapter.file
Class FileTarget

java.lang.Object
  extended by org.springframework.integration.adapter.file.FileTarget
All Implemented Interfaces:
MessageTarget

public class FileTarget
extends java.lang.Object
implements MessageTarget

A message target for writing files. The actual file writing occurs in the message creator (TextFileMessageCreator or ByteArrayFileMessageCreator).

Author:
Mark Fisher, Marius Bogoevici

Field Summary
private  MessageMapper<?,java.io.File> messageMapper
           
 
Constructor Summary
FileTarget(MessageMapper<?,java.io.File> messageMapper)
           
 
Method Summary
 boolean send(Message message)
          Send a Message to this target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messageMapper

private MessageMapper<?,java.io.File> messageMapper
Constructor Detail

FileTarget

public FileTarget(MessageMapper<?,java.io.File> messageMapper)
Method Detail

send

public boolean send(Message message)
Description copied from interface: MessageTarget
Send a Message to this target. May throw a RuntimeException for non-recoverable errors. Otherwise, if the Message cannot be sent for a non-fatal reason such as timeout, then this method will return 'false', and if the Message is sent successfully, it will return 'true'.

Specified by:
send in interface MessageTarget
Parameters:
message - the Message to send
Returns:
whether the Message has been sent successfully