void stopRecording( final long correlationId, final ControlSession controlSession, final int streamId, final String channel) { try { final String key = makeKey(streamId, ChannelUri.parse(channel)); final Subscription oldSubscription = recordingSubscriptionMap.remove(key); if (oldSubscription != null) { oldSubscription.close(); controlSession.sendOkResponse(correlationId, controlResponseProxy); } else { final String msg = "no recording found for streamId=" + streamId + " channel=" + channel; controlSession.sendErrorResponse(correlationId, UNKNOWN_SUBSCRIPTION, msg, controlResponseProxy); } } catch (final Exception ex) { errorHandler.onError(ex); controlSession.sendErrorResponse(correlationId, ex.getMessage(), controlResponseProxy); } }
void cleanupPublication(final NetworkPublication publication) { activeSessionIds.remove(publication.sessionId()); senderProxy.removeNetworkPublication(publication); final SendChannelEndpoint channelEndpoint = publication.channelEndpoint(); if (channelEndpoint.shouldBeClosed()) { channelEndpoint.closeStatusIndicator(); sendChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); senderProxy.closeSendChannelEndpoint(channelEndpoint); } }
void cleanupSubscriptionLink(final SubscriptionLink subscription) { final ReceiveChannelEndpoint channelEndpoint = subscription.channelEndpoint(); if (null != channelEndpoint) { if (subscription.hasSessionId()) { if (0 == channelEndpoint.decRefToStreamAndSession(subscription.streamId(), subscription.sessionId())) { receiverProxy.removeSubscription(channelEndpoint, subscription.streamId()); } } else { if (0 == channelEndpoint.decRefToStream(subscription.streamId())) { receiverProxy.removeSubscription(channelEndpoint, subscription.streamId()); } } if (channelEndpoint.shouldBeClosed()) { channelEndpoint.closeStatusIndicator(); receiveChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); receiverProxy.closeReceiveChannelEndpoint(channelEndpoint); } } }
receiveChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); receiverProxy.closeReceiveChannelEndpoint(channelEndpoint);
void stopRecording( final long correlationId, final ControlSession controlSession, final int streamId, final String channel) { try { final String key = makeKey(streamId, ChannelUri.parse(channel)); final Subscription oldSubscription = recordingSubscriptionMap.remove(key); if (oldSubscription != null) { oldSubscription.close(); controlSession.sendOkResponse(correlationId, controlResponseProxy); } else { final String msg = "no recording found for streamId=" + streamId + " channel=" + channel; controlSession.sendErrorResponse(correlationId, UNKNOWN_SUBSCRIPTION, msg, controlResponseProxy); } } catch (final Exception ex) { errorHandler.onError(ex); controlSession.sendErrorResponse(correlationId, ex.getMessage(), controlResponseProxy); } }
void cleanupPublication(final NetworkPublication publication) { activeSessionIds.remove(publication.sessionId()); senderProxy.removeNetworkPublication(publication); final SendChannelEndpoint channelEndpoint = publication.channelEndpoint(); if (channelEndpoint.shouldBeClosed()) { channelEndpoint.closeStatusIndicator(); sendChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); senderProxy.closeSendChannelEndpoint(channelEndpoint); } }
void cleanupPublication(final NetworkPublication publication) { activeSessionIds.remove(publication.sessionId()); senderProxy.removeNetworkPublication(publication); final SendChannelEndpoint channelEndpoint = publication.channelEndpoint(); if (channelEndpoint.shouldBeClosed()) { channelEndpoint.closeStatusIndicator(); sendChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); senderProxy.closeSendChannelEndpoint(channelEndpoint); } }
void cleanupSubscriptionLink(final SubscriptionLink subscription) { final ReceiveChannelEndpoint channelEndpoint = subscription.channelEndpoint(); if (null != channelEndpoint) { if (subscription.hasSessionId()) { if (0 == channelEndpoint.decRefToStreamAndSession(subscription.streamId(), subscription.sessionId())) { receiverProxy.removeSubscription(channelEndpoint, subscription.streamId()); } } else { if (0 == channelEndpoint.decRefToStream(subscription.streamId())) { receiverProxy.removeSubscription(channelEndpoint, subscription.streamId()); } } if (channelEndpoint.shouldBeClosed()) { channelEndpoint.closeStatusIndicator(); receiveChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); receiverProxy.closeReceiveChannelEndpoint(channelEndpoint); } } }
void cleanupSubscriptionLink(final SubscriptionLink subscription) { final ReceiveChannelEndpoint channelEndpoint = subscription.channelEndpoint(); if (null != channelEndpoint) { if (subscription.hasSessionId()) { if (0 == channelEndpoint.decRefToStreamAndSession(subscription.streamId(), subscription.sessionId())) { receiverProxy.removeSubscription(channelEndpoint, subscription.streamId()); } } else { if (0 == channelEndpoint.decRefToStream(subscription.streamId())) { receiverProxy.removeSubscription(channelEndpoint, subscription.streamId()); } } if (channelEndpoint.shouldBeClosed()) { channelEndpoint.closeStatusIndicator(); receiveChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); receiverProxy.closeReceiveChannelEndpoint(channelEndpoint); } } }
receiveChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); receiverProxy.closeReceiveChannelEndpoint(channelEndpoint);
receiveChannelEndpointByChannelMap.remove(channelEndpoint.udpChannel().canonicalForm()); receiverProxy.closeReceiveChannelEndpoint(channelEndpoint);