org.jboss.soa.esb.actions.converters
Class FileToStream

java.lang.Object
  extended by org.jboss.soa.esb.actions.converters.FileToStream
All Implemented Interfaces:
BeanConfiguredAction

public class FileToStream
extends java.lang.Object
implements BeanConfiguredAction

FileToStream is a converter that open a Stream to the filename specified by the property filename. Usage:

 <action name="fileToStream" class="org.jboss.soa.esb.actions.converters.FileToStream">
 </action>
 
 Optional parameters (default value(s) shown):
    <proptery name="fileNameLocation" value="org.jboss.soa.esb.gateway.file" />
 
Note that 'fileNameLocation' defaults to Environment.ORIGINAL_FILE

Author:
Daniel Bevenius

Constructor Summary
FileToStream()
           
 
Method Summary
 java.lang.String getFileNameLocation()
           
 Message process(Message message)
          Populates the ESB Message objects body with a InputStream for the file identified by the fileNameLocation field.
 void setFileNameLocation(java.lang.String fileNameLocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileToStream

public FileToStream()
Method Detail

process

public Message process(Message message)
                throws ActionProcessingException
Populates the ESB Message objects body with a InputStream for the file identified by the fileNameLocation field.

Parameters:
message - - ESB message object
Returns:
Message - ESB message object which a payload that is an InputStream
Throws:
ActionProcessingException

getFileNameLocation

public java.lang.String getFileNameLocation()

setFileNameLocation

public void setFileNameLocation(java.lang.String fileNameLocation)