Class ClientStubsContentSource
- All Implemented Interfaces:
DownloadServlet.ContentSource
- Author:
- andriy.zhdanov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method may be used to clean up any temporary resources.getId()This method returns a unique string used to identify this.invalid reference
DownloadServlet#ContentSourceThis method is responsible for generating the content and returning an InputStream to that content.longgetLastModified(DownloadServlet.Context context) This method is responsible for returning the last modified date of the content, or -1 if not applicable.
-
Constructor Details
-
ClientStubsContentSource
public ClientStubsContentSource()
-
-
Method Details
-
getId
This method returns a unique string used to identify this
. This string must be specified in order to select the appropriateinvalid reference
DownloadServlet#ContentSourcewhen using theinvalid reference
DownloadServlet#ContentSourceDownloadServlet.- Specified by:
getIdin interfaceDownloadServlet.ContentSource
-
getInputStream
This method is responsible for generating the content and returning an InputStream to that content. It is also responsible for setting any attribute values in the
, such asinvalid reference
DownloadServlet#ContextDownloadServlet.EXTENSIONorDownloadServlet.CONTENT_TYPE.- Specified by:
getInputStreamin interfaceDownloadServlet.ContentSource
-
cleanUp
This method may be used to clean up any temporary resources. It will be invoked after the
InputStreamhas been completely read.- Specified by:
cleanUpin interfaceDownloadServlet.ContentSource
-
getLastModified
This method is responsible for returning the last modified date of the content, or -1 if not applicable. This information will be used for caching. This implementation always returns -1.
- Specified by:
getLastModifiedin interfaceDownloadServlet.ContentSource- Returns:
- -1
-