public Session (final LinkFactory linkFactory, final Configuration initConfiguration, final String initTargetName, final InetSocketAddress inetAddress, final ExecutorService initExecutor) throws Exception {
maxConnections = Integer.parseInt(initConfiguration.getSessionSetting(initTargetName, OperationalTextKey.MAX_CONNECTIONS));
factory = linkFactory;
configuration = initConfiguration;
commandSequenceNumber = new SerialArithmeticNumber();
maximumCommandSequenceNumber = new SerialArithmeticNumber(1);
nextFreeConnectionID = 1;
inetSocketAddress = inetAddress;
initiatorTaskTag = new SerialArithmeticNumber(1);
targetName = initTargetName;
phase = new SecurityNegotiationPhase();
capacityInformations = new TargetCapacityInformations();
connections = new LinkedBlockingQueue<Connection>(maxConnections);
executor = initExecutor;