class JerseyResponseFilter extends Object implements com.sun.jersey.spi.container.ContainerResponseFilter
Post-processing includes 5 steps:
CoreEvent.SERVICE_RESPONSE_FILTER
event to let plugins operate on the response, e.g.
- the Caching plugin sets the Cache-Control
response header
- the Time plugin sets the Last-Modified
response header
include_childs
and
include_assoc_childs
query parameters.
CoreEvent.PRE_SEND_XXX
events for all response object(s) and objects contained in response
directives. This let plugins operate on the response on a per-object basis, e.g.
- the Geomaps plugin enriches an Address topic with its geo coordinate
- the Time plugin enriches topics/associations with creation/modification timestamps
Modifier and Type | Field and Description |
---|---|
private EventManager |
em |
private Logger |
logger |
private javax.servlet.http.HttpServletRequest |
request |
private WebSocketsService |
ws |
Constructor and Description |
---|
JerseyResponseFilter(EventManager em,
WebSocketsService ws) |
Modifier and Type | Method and Description |
---|---|
private void |
broadcast(Directives directives) |
com.sun.jersey.spi.container.ContainerResponse |
filter(com.sun.jersey.spi.container.ContainerRequest request,
com.sun.jersey.spi.container.ContainerResponse response) |
private void |
firePreSend(Directives directives) |
private void |
firePreSend(DMXObject object) |
private void |
firePreSend(Iterable<DMXObject> objects) |
private boolean |
getBooleanQueryParameter(com.sun.jersey.spi.container.ContainerRequest request,
String param) |
private boolean |
getIncludeAssocChilds(com.sun.jersey.spi.container.ContainerRequest request) |
private boolean |
getIncludeChilds(com.sun.jersey.spi.container.ContainerRequest request) |
private boolean |
isIterable(com.sun.jersey.spi.container.ContainerResponse response,
Class elementType) |
private void |
loadChildTopics(DMXObject object,
boolean includeChilds,
boolean includeAssocChilds) |
private void |
loadChildTopics(Iterable<DMXObject> objects,
boolean includeChilds,
boolean includeAssocChilds) |
private void |
loadRelatingAssociationChildTopics(DMXObject object) |
private EventManager em
private WebSocketsService ws
@Context private javax.servlet.http.HttpServletRequest request
JerseyResponseFilter(EventManager em, WebSocketsService ws)
public com.sun.jersey.spi.container.ContainerResponse filter(com.sun.jersey.spi.container.ContainerRequest request, com.sun.jersey.spi.container.ContainerResponse response)
filter
in interface com.sun.jersey.spi.container.ContainerResponseFilter
private void loadChildTopics(DMXObject object, boolean includeChilds, boolean includeAssocChilds)
private void loadChildTopics(Iterable<DMXObject> objects, boolean includeChilds, boolean includeAssocChilds)
private void loadRelatingAssociationChildTopics(DMXObject object)
private void firePreSend(DMXObject object)
private void firePreSend(Iterable<DMXObject> objects)
private void firePreSend(Directives directives)
private void broadcast(Directives directives) throws org.codehaus.jettison.json.JSONException
org.codehaus.jettison.json.JSONException
private boolean isIterable(com.sun.jersey.spi.container.ContainerResponse response, Class elementType)
private boolean getIncludeChilds(com.sun.jersey.spi.container.ContainerRequest request)
private boolean getIncludeAssocChilds(com.sun.jersey.spi.container.ContainerRequest request)
private boolean getBooleanQueryParameter(com.sun.jersey.spi.container.ContainerRequest request, String param)
Copyright © 2018. All Rights Reserved.