Class StreamingOnRequestDataSource
- java.lang.Object
-
- org.apache.synapse.transport.passthru.util.StreamingOnRequestDataSource
-
- All Implemented Interfaces:
DataSource
public class StreamingOnRequestDataSource extends Object implements DataSource
This class has a special flag, which says this is it's last use and not to cache data if it did not have done so already.- Author:
- Srinath Perera (srinath@wso2.com)
-
-
Constructor Summary
Constructors Constructor Description StreamingOnRequestDataSource(InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()InputStreamgetInputStream()StringgetName()OutputStreamgetOutputStream()voidsetLastUse(boolean lastUse)This flag says that this is the last use of the stream, hence do not need to cache it if it has not already cached.
-
-
-
Constructor Detail
-
StreamingOnRequestDataSource
public StreamingOnRequestDataSource(InputStream in)
-
-
Method Detail
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceDataSource
-
getInputStream
public InputStream getInputStream() throws IOException
- Specified by:
getInputStreamin interfaceDataSource- Throws:
IOException
-
getName
public String getName()
- Specified by:
getNamein interfaceDataSource
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin interfaceDataSource- Throws:
IOException
-
setLastUse
public void setLastUse(boolean lastUse)
This flag says that this is the last use of the stream, hence do not need to cache it if it has not already cached.- Parameters:
lastUse-
-
-