Search in sources :

Example 1 with ResponseEvent

use of org.n52.iceland.event.events.ResponseEvent in project arctic-sea by 52North.

the class GenericRequestOperator method receiveRequest.

@Override
public OwsServiceResponse receiveRequest(final OwsServiceRequest abstractRequest) throws OwsExceptionReport {
    this.eventBus.submit(new RequestEvent(abstractRequest));
    if (requestType.isAssignableFrom(abstractRequest.getClass())) {
        Q request = requestType.cast(abstractRequest);
        checkForModifierAndProcess(request);
        this.validator.validate(request);
        A response = receive(request);
        this.eventBus.submit(new ResponseEvent(response));
        checkForModifierAndProcess(request, response);
        return response;
    } else {
        throw new OperationNotSupportedException(abstractRequest.getOperationName());
    }
}
Also used : OperationNotSupportedException(org.n52.shetland.ogc.ows.exception.OperationNotSupportedException) RequestEvent(org.n52.iceland.event.events.RequestEvent) ResponseEvent(org.n52.iceland.event.events.ResponseEvent)

Aggregations

RequestEvent (org.n52.iceland.event.events.RequestEvent)1 ResponseEvent (org.n52.iceland.event.events.ResponseEvent)1 OperationNotSupportedException (org.n52.shetland.ogc.ows.exception.OperationNotSupportedException)1