| java.lang.Object |
| ↳ |
com.atlassian.confluence.servlet.download.ServeAfterTransactionDownload |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Class Overview
This abstract download strategy allows implementors to gather necessary information from a database and set HTTP
headers within a database transaction. Streaming of the actual download is done after the transaction is finished
so that the database connection lifetime is not bound to the entire request lifetime.
Summary
| Nested Classes |
|
class |
ServeAfterTransactionDownload.StreamResultCallback |
Spring transactional callback that calls getStreamForDownload within a database transaction
|
| Protected Methods |
|
abstract
InputStream
|
getStreamForDownload(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
Get the input stream to serve to the client outside of the database transaction.
|
|
TransactionCallback
|
getStreamResultCallback(HttpServletRequest request, HttpServletResponse response)
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
From interface
com.atlassian.plugin.servlet.DownloadStrategy
|
abstract
boolean
|
matches(String arg0)
|
|
abstract
void
|
serveFile(HttpServletRequest arg0, HttpServletResponse arg1)
|
|
Public Constructors
public
ServeAfterTransactionDownload
()
Public Methods
public
static
String
getDecodedPathInfo
(HttpServletRequest httpServletRequest)
public
final
void
serveFile
(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
public
void
setTransactionManager
(PlatformTransactionManager transactionManager)
Protected Methods
protected
abstract
InputStream
getStreamForDownload
(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
Get the input stream to serve to the client outside of the database transaction.
The inputstream must be useable outside of the database transaction that created it
Returns
- The input stream to serve, or null if nothing to serve.
protected
TransactionCallback
getStreamResultCallback
(HttpServletRequest request, HttpServletResponse response)