Package org.wso2.carbon.relay
Class StreamingOnRequestDataSource
java.lang.Object
org.wso2.carbon.relay.StreamingOnRequestDataSource
- All Implemented Interfaces:
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 -
Method Summary
Modifier and TypeMethodDescriptiongetName()booleanIndicates whether or not the InputStream of the message has been consumedvoidsetLastUse(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 Details
-
StreamingOnRequestDataSource
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfaceDataSource
-
getInputStream
- Specified by:
getInputStreamin interfaceDataSource- Throws:
IOException
-
getName
- Specified by:
getNamein interfaceDataSource
-
getOutputStream
- 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-
-
isConsumed
public boolean isConsumed()Indicates whether or not the InputStream of the message has been consumed- Returns:
- true if the InputStream has already been consumed, false otherwise.
-