コード例 #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));
 }