|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.service.event.JSONOutputEvent
public class JSONOutputEvent
is a stop and output Event sending a JSON response.
This Event is useful for AJAX communication.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.torweg.pulse.service.event.Event |
|---|
Event.Disposition |
| Constructor Summary | |
|---|---|
JSONOutputEvent(java.lang.Boolean boo)
creates a new JSONOutputEvent for the given Boolean. |
|
JSONOutputEvent(net.sf.json.JSONArray obj)
creates a new JSONOutputEvent for the given JSONArray. |
|
JSONOutputEvent(net.sf.json.JSONObject obj)
creates a new JSONOutputEvent for the given JSONObject. |
|
JSONOutputEvent(java.lang.Object jaxbEnabled)
creates a new JSONOutputEvent for the given JAXB-enabled object. |
|
| 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)
sends the JSON response. |
void |
setCacheMode(CacheMode c)
sets the CacheMode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSONOutputEvent(net.sf.json.JSONObject obj)
JSONOutputEvent for the given JSONObject.
obj - the JSONObject to be outputtedpublic JSONOutputEvent(net.sf.json.JSONArray obj)
JSONOutputEvent for the given JSONArray.
obj - the JSONArray to be outputtedpublic JSONOutputEvent(java.lang.Boolean boo)
JSONOutputEvent for the given Boolean.
boo - the Boolean to be outputtedpublic JSONOutputEvent(java.lang.Object jaxbEnabled)
JSONOutputEvent for the given JAXB-enabled object.
jaxbEnabled - the object| Method Detail |
|---|
public final void run(ServiceRequest req)
run in interface Eventreq - the current 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||