/// <summary> /// Initializes the session object. /// </summary> /// <param name="type">A prefix to the session name for debugging purposes.</param> /// <param name="connection">The connection in which the session is created.</param> /// <param name="settings">The session settings.</param> /// <param name="linkFactory">The factory to create <see cref="AmqpLink"/> objects when an <see cref="Attach"/> frame is received.</param> protected AmqpSession(string type, AmqpConnection connection, AmqpSessionSettings settings, ILinkFactory linkFactory) : base(type) { Fx.Assert(connection != null, "connection must not be null"); Fx.Assert(settings != null, "settings must not be null"); this.connection = connection; this.settings = settings; this.linkFactory = linkFactory; this.State = AmqpObjectState.Start; this.links = new Dictionary <string, AmqpLink>(); this.linksByLocalHandle = new HandleTable <AmqpLink>(settings.HandleMax ?? AmqpConstants.DefaultMaxLinkHandles - 1); this.linksByRemoteHandle = new HandleTable <AmqpLink>(settings.HandleMax ?? AmqpConstants.DefaultMaxLinkHandles - 1); this.outgoingChannel = new OutgoingSessionChannel(this); this.incomingChannel = new IncomingSessionChannel(this); }
public AmqpSession(AmqpConnection connection, AmqpSessionSettings settings, ILinkFactory linkFactory) { Fx.Assert(connection != null, "connection must not be null"); Fx.Assert(settings != null, "settings must not be null"); this.connection = connection; this.settings = settings; this.linkFactory = linkFactory; this.State = AmqpObjectState.Start; this.links = new Dictionary <string, AmqpLink>(); this.linksByLocalHandle = new HandleTable <AmqpLink>(uint.MaxValue); this.linksByRemoteHandle = new HandleTable <AmqpLink>(uint.MaxValue); this.outgoingChannel = new OutgoingSessionChannel(this); this.incomingChannel = new IncomingSessionChannel(this); this.diagnostics = new Diagnostics(); }
protected AmqpSession(string type, AmqpConnection connection, AmqpSessionSettings settings, ILinkFactory linkFactory) : base(type) { Fx.Assert(connection != null, "connection must not be null"); Fx.Assert(settings != null, "settings must not be null"); this.connection = connection; this.settings = settings; this.linkFactory = linkFactory; this.State = AmqpObjectState.Start; this.links = new Dictionary<string, AmqpLink>(); this.linksByLocalHandle = new HandleTable<AmqpLink>(settings.HandleMax ?? AmqpConstants.DefaultMaxLinkHandles - 1); this.linksByRemoteHandle = new HandleTable<AmqpLink>(settings.HandleMax ?? AmqpConstants.DefaultMaxLinkHandles - 1); this.outgoingChannel = new OutgoingSessionChannel(this); this.incomingChannel = new IncomingSessionChannel(this); }
public AmqpSession(AmqpConnection connection, AmqpSessionSettings settings, ILinkFactory linkFactory) { Fx.Assert(connection != null, "connection must not be null"); Fx.Assert(settings != null, "settings must not be null"); this.connection = connection; this.settings = settings; this.linkFactory = linkFactory; this.State = AmqpObjectState.Start; this.links = new Dictionary<string, AmqpLink>(); this.linksByLocalHandle = new HandleTable<AmqpLink>(uint.MaxValue); this.linksByRemoteHandle = new HandleTable<AmqpLink>(uint.MaxValue); this.outgoingChannel = new OutgoingSessionChannel(this); this.incomingChannel = new IncomingSessionChannel(this); this.diagnostics = new Diagnostics(); }