public EndpointResponse removeMediaChannel(RemoveMediaChannelRequest request) {
    try {
      mediaChannelDao.remove(request.getMediaChannelId());
      return EndpointHelper.createResponse(EndpointResponse.class, request);

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(EndpointResponse.class, request, e);
    }
  }
  public CreateMediaChannelResponse createMediaChannel(CreateMediaChannelRequest request) {
    try {
      CreateMediaChannelResponse response =
          EndpointHelper.createResponse(CreateMediaChannelResponse.class, request);
      response.setMediaChannel(mediaChannelDao.add(request.getMediaChannel()));
      return response;

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(CreateMediaChannelResponse.class, request, e);
    }
  }
  public FindMediaChannelResponse findMediaChannel(FindMediaChannelRequest request) {
    try {
      FindMediaChannelResponse r =
          EndpointHelper.createResponse(FindMediaChannelResponse.class, request);
      r.setMediaChannel(mediaChannelDao.get(request.getMediaChannelId()));
      return r;

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(FindMediaChannelResponse.class, request, e);
    }
  }
  public ListMediaChannelsResponse listMediaChannels(ListMediaChannelsRequest request) {
    try {
      ListMediaChannelsResponse r =
          EndpointHelper.createResponse(ListMediaChannelsResponse.class, request);
      r.setMediaChannels(mediaChannelDao.findAll());
      return r;

    } catch (Exception e) {
      return EndpointHelper.createErrorResponse(FindMediaChannelResponse.class, request, e);
    }
  }