Ejemplo n.º 1
0
  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);
    }
  }
Ejemplo n.º 2
0
  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);
    }
  }
Ejemplo n.º 3
0
  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);
    }
  }
Ejemplo n.º 4
0
  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);
    }
  }