use of io.aeron.ChannelUri in project aeron by real-logic.
the class DriverConductor method onRemoveSendDestination.
void onRemoveSendDestination(final long registrationId, final String destinationChannel, final long correlationId) {
SendChannelEndpoint sendChannelEndpoint = null;
for (int i = 0, size = networkPublications.size(); i < size; i++) {
final NetworkPublication publication = networkPublications.get(i);
if (registrationId == publication.registrationId()) {
sendChannelEndpoint = publication.channelEndpoint();
break;
}
}
if (null == sendChannelEndpoint) {
throw new ControlProtocolException(UNKNOWN_PUBLICATION, "unknown publication: " + registrationId);
}
sendChannelEndpoint.validateAllowsManualControl();
final ChannelUri channelUri = ChannelUri.parse(destinationChannel);
final InetSocketAddress dstAddress = UdpChannel.destinationAddress(channelUri, nameResolver);
senderProxy.removeDestination(sendChannelEndpoint, channelUri, dstAddress);
clientProxy.operationSucceeded(correlationId);
}
Aggregations