use of org.apache.jackrabbit.webdav.observation.SubscriptionInfo in project jackrabbit by apache.
the class AbstractWebdavServlet method doSubscribe.
/**
* The SUBSCRIBE method
*
* @param request
* @param response
* @param resource
* @throws IOException
* @throws DavException
*/
protected void doSubscribe(WebdavRequest request, WebdavResponse response, DavResource resource) throws IOException, DavException {
if (!(resource instanceof ObservationResource)) {
response.sendError(DavServletResponse.SC_METHOD_NOT_ALLOWED);
return;
}
SubscriptionInfo info = request.getSubscriptionInfo();
if (info == null) {
response.sendError(DavServletResponse.SC_UNSUPPORTED_MEDIA_TYPE);
return;
}
Subscription subs = ((ObservationResource) resource).subscribe(info, request.getSubscriptionId());
response.sendSubscriptionResponse(subs);
}
Aggregations