Class LogViewerContentSource
- java.lang.Object
-
- org.glassfish.admingui.common.servlet.LogViewerContentSource
-
- All Implemented Interfaces:
DownloadServlet.ContentSource
public class LogViewerContentSource extends Object implements DownloadServlet.ContentSource
- Author:
- andriy.zhdanov
-
-
Constructor Summary
Constructors Constructor Description LogViewerContentSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp(DownloadServlet.Context ctx)This method may be used to clean up any temporary resources.StringgetId()This method returns a unique string used to identify thisDownloadServlet.getContentSource(String).InputStreamgetInputStream(DownloadServlet.Context ctx)This 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.
-
-
-
Method Detail
-
getId
public String getId()
This method returns a unique string used to identify this
DownloadServlet.getContentSource(String). This string must be specified in order to select the appropriateDownloadServlet.getContentSource(String)when using theDownloadServlet.- Specified by:
getIdin interfaceDownloadServlet.ContentSource
-
getInputStream
public InputStream getInputStream(DownloadServlet.Context ctx)
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
DownloadServlet.CONTENT_SOURCES, such asDownloadServlet.EXTENSIONorDownloadServlet.CONTENT_TYPE.- Specified by:
getInputStreamin interfaceDownloadServlet.ContentSource
-
cleanUp
public void cleanUp(DownloadServlet.Context ctx)
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
public long getLastModified(DownloadServlet.Context context)
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
-
-