Search in sources :

Example 1 with GetEvent

use of io.milton.event.GetEvent in project lobcder by skoulouzis.

the class GetHandler method processExistingResource.

@Override
public void processExistingResource(HttpManager manager, Request request, Response response, Resource resource) throws NotAuthorizedException, BadRequestException, ConflictException, NotFoundException {
    if (log.isTraceEnabled()) {
        log.trace("process: " + request.getAbsolutePath());
    }
    manager.getEventManager().fireEvent(new GetEvent(resource));
    GetableResource r = (GetableResource) resource;
    if (checkConditional(r, request)) {
        if (log.isTraceEnabled()) {
            log.trace("respond not modified with: " + responseHandler.getClass().getCanonicalName());
        }
        responseHandler.respondNotModified(r, response, request);
        return;
    }
    sendContent(manager, request, response, r, request.getParams());
}
Also used : GetableResource(io.milton.resource.GetableResource) GetEvent(io.milton.event.GetEvent)

Aggregations

GetEvent (io.milton.event.GetEvent)1 GetableResource (io.milton.resource.GetableResource)1