org.glassfish.admingui.common.servlet
Class ClientStubsContentSource

java.lang.Object
  extended by org.glassfish.admingui.common.servlet.ClientStubsContentSource
All Implemented Interfaces:
DownloadServlet.ContentSource

public class ClientStubsContentSource
extends java.lang.Object
implements DownloadServlet.ContentSource

Author:
andriy.zhdanov

Constructor Summary
ClientStubsContentSource()
           
 
Method Summary
 void cleanUp(DownloadServlet.Context ctx)
           This method may be used to clean up any temporary resources.
 java.lang.String getId()
           This method returns a unique string used to identify this DownloadServlet#ContentSource.
 java.io.InputStream getInputStream(DownloadServlet.Context ctx)
           This method is responsible for generating the content and returning an InputStream to that content.
 long getLastModified(DownloadServlet.Context context)
           This method is responsible for returning the last modified date of the content, or -1 if not applicable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientStubsContentSource

public ClientStubsContentSource()
Method Detail

getId

public java.lang.String getId()

This method returns a unique string used to identify this DownloadServlet#ContentSource. This string must be specified in order to select the appropriate DownloadServlet#ContentSource when using the DownloadServlet.

Specified by:
getId in interface DownloadServlet.ContentSource

getInputStream

public java.io.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#Context, such as DownloadServlet.EXTENSION or DownloadServlet.CONTENT_TYPE.

Specified by:
getInputStream in interface DownloadServlet.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 InputStream has been completely read.

Specified by:
cleanUp in interface DownloadServlet.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:
getLastModified in interface DownloadServlet.ContentSource
Returns:
-1


Copyright © 2012 GlassFish Community. All Rights Reserved.