com.ibm.xsp.webapp.resources
Class AbstractResourceProvider.AbstractResource

java.lang.Object
  extended by com.ibm.xsp.webapp.resources.AbstractResourceProvider.AbstractResource
All Implemented Interfaces:
Resource
Direct Known Subclasses:
AbstractResourceProvider.FileResource, DojoLibResourceProvider.DojoResource, JavaResourceProvider.JavaResource, URLResourceProvider.URLResource
Enclosing class:
AbstractResourceProvider

protected abstract class AbstractResourceProvider.AbstractResource
extends java.lang.Object
implements Resource


Field Summary
protected  java.lang.String mimeType
           
protected  java.lang.String resourceName
           
 
Constructor Summary
protected AbstractResourceProvider.AbstractResource(java.lang.String resourceName)
           
 
Method Summary
protected  java.lang.String findMimeType()
           
protected  long getContentlength(boolean gzip)
           
protected  long getExpireTime()
           
protected  long getLastModificationDate()
           
 java.lang.String getResourceName()
           
protected  long getResourcesExpireDate()
           
protected  boolean isResourcesModifiedSince(long ts)
           
protected  boolean shouldGZip(java.lang.String resName, int length)
           
protected  boolean supportsGzip(javax.servlet.http.HttpServletRequest request)
           
 void write(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected abstract  void writeData(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceName

protected java.lang.String resourceName

mimeType

protected java.lang.String mimeType
Constructor Detail

AbstractResourceProvider.AbstractResource

protected AbstractResourceProvider.AbstractResource(java.lang.String resourceName)
Method Detail

getResourceName

public java.lang.String getResourceName()

findMimeType

protected java.lang.String findMimeType()

write

public void write(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException
Specified by:
write in interface Resource
Throws:
java.io.IOException

writeData

protected abstract void writeData(javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws java.io.IOException
Throws:
java.io.IOException

isResourcesModifiedSince

protected boolean isResourcesModifiedSince(long ts)

getResourcesExpireDate

protected final long getResourcesExpireDate()

getLastModificationDate

protected long getLastModificationDate()

getContentlength

protected long getContentlength(boolean gzip)

getExpireTime

protected long getExpireTime()

supportsGzip

protected boolean supportsGzip(javax.servlet.http.HttpServletRequest request)

shouldGZip

protected boolean shouldGZip(java.lang.String resName,
                             int length)