예제 #1
0
  @Override
  protected void process(
      IContinuation continuation,
      UserDataRequest udr,
      Document doc,
      ActiveSyncRequest request,
      Responder responder) {

    MeetingHandlerRequest meetingRequest;
    try {

      meetingRequest = meetingProtocol.getRequest(doc);
      MeetingHandlerResponse meetingResponse = doTheJob(meetingRequest, udr);
      Document document = meetingProtocol.encodeResponses(meetingResponse);
      sendResponse(responder, document);

    } catch (NoDocumentException e) {
      sendErrorResponse(responder, MeetingResponseStatus.INVALID_MEETING_RREQUEST);
    } catch (CollectionNotFoundException e) {
      sendErrorResponse(responder, MeetingResponseStatus.INVALID_MEETING_RREQUEST);
    } catch (ProcessingEmailException e) {
      logger.error(e.getMessage(), e);
      sendErrorResponse(responder, MeetingResponseStatus.SERVER_ERROR);
    } catch (ConversionException e) {
      logger.error(e.getMessage(), e);
      sendErrorResponse(responder, MeetingResponseStatus.SERVER_ERROR);
    }
  }
예제 #2
0
 private void sendErrorResponse(Responder responder, MeetingResponseStatus status) {
   sendResponse(responder, meetingProtocol.encodeErrorResponse(status));
 }