import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.List;
-import java.util.concurrent.ExecutionException;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opendaylight.protocol.concepts.KeyMapping;
private final Timer timer = new HashedWheelTimer();
private PCCDispatcherImpl pccDispatcher;
- PCCsBuilder(final int lsps, final boolean pcError, final int pccCount, @Nonnull final InetSocketAddress localAddress,
- @Nonnull final List<InetSocketAddress> remoteAddress, final short keepAlive, final short deadTimer,
- @Nullable final String password, final long reconnectTime, final int redelegationTimeout, final int stateTimeout,
- @Nonnull final PCEPCapability pcepCapabilities) {
+ PCCsBuilder(final int lsps, final boolean pcError, final int pccCount,
+ @Nonnull final InetSocketAddress localAddress, @Nonnull final List<InetSocketAddress> remoteAddress,
+ final short keepAlive, final short deadTimer, @Nullable final String password, final long reconnectTime,
+ final int redelegationTimeout, final int stateTimeout, @Nonnull final PCEPCapability pcepCapabilities) {
this.lsps = lsps;
this.pcError = pcError;
this.pccCount = pccCount;
startActivators();
}
- void createPCCs(final BigInteger initialDBVersion, final Optional<TimerHandler> timerHandler)
- throws InterruptedException, ExecutionException {
+ void createPCCs(final BigInteger initialDBVersion, final Optional<TimerHandler> timerHandler) {
InetAddress currentAddress = this.localAddress.getAddress();
this.pccDispatcher = new PCCDispatcherImpl(ServiceLoaderPCEPExtensionProviderContext.getSingletonInstance()
.getMessageHandlerRegistry());
for (int i = 0; i < this.pccCount; i++) {
final PCCTunnelManager tunnelManager = new PCCTunnelManagerImpl(this.lsps, currentAddress,
this.redelegationTimeout, this.stateTimeout, this.timer, timerHandler);
- createPCC(new InetSocketAddress(currentAddress, this.localAddress.getPort()), tunnelManager, initialDBVersion);
+ createPCC(new InetSocketAddress(currentAddress, this.localAddress.getPort()), tunnelManager,
+ initialDBVersion);
currentAddress = InetAddresses.increment(currentAddress);
}
}
- private void createPCC(@Nonnull final InetSocketAddress localAddress, @Nonnull final PCCTunnelManager tunnelManager,
- final BigInteger initialDBVersion) throws InterruptedException, ExecutionException {
+ private void createPCC(@Nonnull final InetSocketAddress plocalAddress,
+ final PCCTunnelManager tunnelManager, final BigInteger initialDBVersion) {
final PCEPSessionNegotiatorFactory<PCEPSessionImpl> snf = getSessionNegotiatorFactory();
for (final InetSocketAddress pceAddress : this.remoteAddress) {
this.pccDispatcher.createClient(pceAddress, this.reconnectTime, () -> new PCCSessionListener(
- this.remoteAddress.indexOf(pceAddress), tunnelManager, this.pcError), snf,
- KeyMapping.getKeyMapping(pceAddress.getAddress(), this.password), localAddress, initialDBVersion);
+ this.remoteAddress.indexOf(pceAddress), tunnelManager, this.pcError), snf,
+ KeyMapping.getKeyMapping(pceAddress.getAddress(), this.password), plocalAddress, initialDBVersion);
}
}