|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.service.event.DownloadEvent
public class DownloadEvent
is an Event that causes the pulse service to present a
download instead of a view.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.torweg.pulse.service.event.Event |
|---|
Event.Disposition |
| Constructor Summary | |
|---|---|
DownloadEvent(java.io.File dl)
creates a new DownloadEvent for the specified file, using the
default MIME type "application/octet-stream" with
Event.Disposition.ATTACHED and CacheMode.NONE. |
|
DownloadEvent(java.io.File dl, CacheMode c)
creates a new DownloadEvent for the specified file, using the
default MIME type "application/octet-stream" with
Event.Disposition.ATTACHED and the given cache mode. |
|
DownloadEvent(java.io.File dl, Event.Disposition disp)
creates a new DownloadEvent for the specified file, using the
default MIME type "application/octet-stream", the given
"Content-Disposition" and CacheMode.NONE. |
|
DownloadEvent(java.io.File dl, Event.Disposition disp, CacheMode c)
creates a new DownloadEvent for the specified file, using the
default MIME type "application/octet-stream", the given
"Content-Disposition" and the given cache mode. |
|
DownloadEvent(java.io.File dl, Event.Disposition disp,
java.lang.String type)
creates a new DownloadEvent for the specified file, using the
specified MIME type and the given "Content-Disposition" and
CacheMode.NONE. |
|
DownloadEvent(java.io.File dl, Event.Disposition disp,
java.lang.String type, CacheMode c)
creates a new DownloadEvent for the specified file, using the
specified MIME type and the given "Content-Disposition" and the given
cache mode. |
|
DownloadEvent(java.io.File dl,
java.lang.String type)
creates a new DownloadEvent for the specified file, using the
specified MIME type with Event.Disposition.ATTACHED and
CacheMode.NONE. |
|
DownloadEvent(java.io.File dl,
java.lang.String type, CacheMode c)
creates a new DownloadEvent for the specified file, using the
specified MIME type with Event.Disposition.ATTACHED and the given
cache mode. |
|
DownloadEvent(SerializableDataSource dl)
create a new DownloadEvent for the specified data source with
Event.Disposition.ATTACHED and CacheMode.NONE. |
|
DownloadEvent(SerializableDataSource dl, CacheMode c)
create a new DownloadEvent for the specified data source with
Event.Disposition.ATTACHED and the given cache mode. |
|
DownloadEvent(SerializableDataSource dl, Event.Disposition disp)
create a new DownloadEvent for the specified data source, the
given "Content-Disposition" and CacheMode.NONE. |
|
DownloadEvent(SerializableDataSource dl, Event.Disposition disp, CacheMode c)
create a new DownloadEvent for the specified data source, the
given "Content-Disposition" and the given cache mode. |
|
| Method Summary | |
|---|---|
CacheMode |
getCacheMode()
returns the CacheMode. |
boolean |
isOutputEvent()
Indicates if this Event will write to the
OutputStream and so render the OutputStream
unwritable for future results. |
boolean |
isSingularEvent()
Indicates that the Event will only be added once to the
EventManager and block all other Events. |
boolean |
isStopEvent()
Indicates if the Invoker should proceed executing other
bundles or if it should terminate after executing this Event
. |
void |
run(ServiceRequest req)
will start the download process, if the HttpServletResponse is
still writable. |
void |
setCacheMode(CacheMode c)
sets the CacheMode. |
java.lang.String |
toString()
returns a string representation of the DownloadEvent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DownloadEvent(SerializableDataSource dl)
DownloadEvent for the specified data source with
Event.Disposition.ATTACHED and CacheMode.NONE.
dl - the data sourcepublic DownloadEvent(SerializableDataSource dl, CacheMode c)
DownloadEvent for the specified data source with
Event.Disposition.ATTACHED and the given cache mode.
dl - the data sourcec - the cache modepublic DownloadEvent(SerializableDataSource dl, Event.Disposition disp)
DownloadEvent for the specified data source, the
given "Content-Disposition" and CacheMode.NONE.
dl - the data sourcedisp - the "Content-Disposition"public DownloadEvent(SerializableDataSource dl, Event.Disposition disp, CacheMode c)
DownloadEvent for the specified data source, the
given "Content-Disposition" and the given cache mode.
dl - the data sourcedisp - the "Content-Disposition"c - the cache modepublic DownloadEvent(java.io.File dl)
DownloadEvent for the specified file, using the
default MIME type "application/octet-stream" with
Event.Disposition.ATTACHED and CacheMode.NONE.
dl - the File to be presented as a downloadpublic DownloadEvent(java.io.File dl, CacheMode c)
DownloadEvent for the specified file, using the
default MIME type "application/octet-stream" with
Event.Disposition.ATTACHED and the given cache mode.
dl - the File to be presented as a downloadc - the cache modepublic DownloadEvent(java.io.File dl, Event.Disposition disp)
DownloadEvent for the specified file, using the
default MIME type "application/octet-stream", the given
"Content-Disposition" and CacheMode.NONE.
dl - the File to be presented as a downloaddisp - the "Content-Disposition"public DownloadEvent(java.io.File dl, Event.Disposition disp, CacheMode c)
DownloadEvent for the specified file, using the
default MIME type "application/octet-stream", the given
"Content-Disposition" and the given cache mode.
dl - the File to be presented as a downloaddisp - the "Content-Disposition"c - the cache mode
public DownloadEvent(java.io.File dl,
java.lang.String type)
DownloadEvent for the specified file, using the
specified MIME type with Event.Disposition.ATTACHED and
CacheMode.NONE.
dl - the File to be presented as a downloadtype - the MIME type to be used for the download
public DownloadEvent(java.io.File dl,
java.lang.String type, CacheMode c)
DownloadEvent for the specified file, using the
specified MIME type with Event.Disposition.ATTACHED and the given
cache mode.
dl - the File to be presented as a downloadtype - the MIME type to be used for the downloadc - the cache mode
public DownloadEvent(java.io.File dl, Event.Disposition disp,
java.lang.String type)
DownloadEvent for the specified file, using the
specified MIME type and the given "Content-Disposition" and
CacheMode.NONE.
dl - the File to be presented as a downloaddisp - the "Content-Disposition"type - the MIME type to be used for the download
public DownloadEvent(java.io.File dl, Event.Disposition disp,
java.lang.String type, CacheMode c)
DownloadEvent for the specified file, using the
specified MIME type and the given "Content-Disposition" and the given
cache mode.
dl - the File to be presented as a downloaddisp - the "Content-Disposition"type - the MIME type to be used for the downloadc - the cache mode| Method Detail |
|---|
public final void run(ServiceRequest req)
HttpServletResponse is
still writable.
run in interface Eventreq - the ServiceRequestEvent.run(org.torweg.pulse.service.request.ServiceRequest)public final boolean isStopEvent()
EventInvoker should proceed executing other
bundles or if it should terminate after executing this Event
.
isStopEvent in interface EventtrueEvent.isStopEvent()public final boolean isOutputEvent()
EventEvent will write to the
OutputStream and so render the OutputStream
unwritable for future results.
Please note: After writing to the OutputStream it should be
flushed and closed.
isOutputEvent in interface EventtrueEvent.isOutputEvent()public final boolean isSingularEvent()
EventEvent will only be added once to the
EventManager and block all other Events.
If an Event of the same type has already been added to the
EventManager, subsequent calls to
EventManager.addEvent(Event) will return without adding the given
Event.
isSingularEvent in interface EventtrueEvent.isSingularEvent()public final CacheMode getCacheMode()
CacheMode.
getCacheMode in interface EventEvent.getCacheMode()public final void setCacheMode(CacheMode c)
CacheMode.
setCacheMode in interface Eventc - the cache mode to setEvent.setCacheMode(org.torweg.pulse.service.request.CacheMode)public java.lang.String toString()
DownloadEvent.
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||