Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="parent">The parent of this channel. Pass <c>null</c> if there's no parent.</param>
 /// <param name="id">An <see cref="IChannelId"/> for the new channel.</param>
 protected AbstractChannel(IChannel parent, IChannelId id)
 {
     this.Parent        = parent;
     this.Id            = id;
     this.channelUnsafe = this.NewUnsafe();
     this.pipeline      = this.NewChannelPipeline();
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Creates a new instance.
 ///     @param parent
 ///     the parent of this channel. {@code null} if there's no parent.
 /// </summary>
 protected AbstractChannel(IChannel parent)
 {
     this.Parent        = parent;
     this.Id            = this.NewId();
     this.channelUnsafe = this.NewUnsafe();
     this.pipeline      = new DefaultChannelPipeline(this);
 }
Ejemplo n.º 3
0
 ///// <summary>
 // /// Creates a new instance.
 // ///
 // /// @param parent
 // ///        the parent of this channel. {@code null} if there's no parent.
 // /// </summary>
 //protected AbstractChannel(IChannel parent)
 //    : this(DefaultChannelId.NewInstance())
 //{
 //}
 /// <summary>
 /// Creates a new instance.
 ///
 //* @param parent
 //*        the parent of this channel. {@code null} if there's no parent.
 /// </summary>
 protected AbstractChannel(IChannel parent /*, ChannelId id*/)
 {
     this.Parent = parent;
     //this.Id = id;
     this.channelUnsafe = this.NewUnsafe();
     this.pipeline      = new DefaultChannelPipeline(this);
 }
        public DefaultChannelHandlerContext(
            DefaultChannelPipeline pipeline, IEventExecutor executor, string name, IChannelHandler handler)
            : base(pipeline, executor, name, GetSkipPropagationFlags(handler))
        {
            Contract.Requires(handler != null);

            this.Handler = handler;
        }
Ejemplo n.º 5
0
        public DefaultChannelHandlerContext(
            DefaultChannelPipeline pipeline, IChannelHandlerInvoker invoker, string name, IChannelHandler handler)
            : base(pipeline, invoker, name, GetSkipPropagationFlags(handler))
        {
            Contract.Requires(handler != null);

            this.handler = handler;
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 /// <param name="parent">The parent of this channel. Pass <c>null</c> if there's no parent.</param>
 /// <param name="id">An <see cref="IChannelId"/> for the new channel.</param>
 protected AbstractChannel(IChannel parent, IChannelId id)
 {
     Parent             = parent;
     Id                 = id;
     _channelUnsafe     = NewUnsafe();
     _pipeline          = NewChannelPipeline();
     _unsafeVoidPromise = new VoidChannelPromise(this, false);
     _closeFuture       = NewPromise();
 }
        protected AbstractChannelHandlerContext(DefaultChannelPipeline pipeline, IEventExecutor executor,
                                                string name, SkipFlags skipPropagationDirections)
        {
            Contract.Requires(pipeline != null);
            Contract.Requires(name != null);

            this.pipeline             = pipeline;
            this.Name                 = name;
            this.executor             = executor;
            this.SkipPropagationFlags = skipPropagationDirections;
        }
        public DefaultChannelHandlerContext(
            DefaultChannelPipeline pipeline, IEventExecutor executor, string name, IChannelHandler handler)
            : base(pipeline, executor, name, GetSkipPropagationFlags(handler))
        {
            if (handler is null)
            {
                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.handler);
            }

            Handler = handler;
        }
        protected AbstractChannelHandlerContext(DefaultChannelPipeline pipeline, IChannelHandlerInvoker invoker,
                                                string name, int skipPropagationDirections)
        {
            Contract.Requires(pipeline != null);
            Contract.Requires(name != null);

            this.pipeline             = pipeline;
            this.Name                 = name;
            this.invoker              = invoker;
            this.SkipPropagationFlags = skipPropagationDirections;
        }
Ejemplo n.º 10
0
 public TailContext(DefaultChannelPipeline pipeline)
     : base(pipeline, null, "<null>", SkipFlags)
 {
 }
Ejemplo n.º 11
0
 public PendingHandlerRemovedTask(DefaultChannelPipeline pipeline, AbstractChannelHandlerContext ctx)
     : base(pipeline, ctx)
 {
 }
Ejemplo n.º 12
0
 protected PendingHandlerCallback(DefaultChannelPipeline pipeline, AbstractChannelHandlerContext ctx)
 {
     this.Pipeline = pipeline;
     this.Ctx      = ctx;
 }
Ejemplo n.º 13
0
 public HeadContext(DefaultChannelPipeline pipeline)
     : base(pipeline, null, HeadName, SkipFlags)
 {
     this.channelUnsafe = pipeline.Channel.Unsafe;
     this.SetAdded();
 }
Ejemplo n.º 14
0
 public TailContext(DefaultChannelPipeline pipeline)
     : base(pipeline, null, TailName, SkipFlags)
 {
     this.SetAdded();
 }
Ejemplo n.º 15
0
 public TailContext(DefaultChannelPipeline pipeline)
     : base(pipeline, null, "<null>", SkipPropagationDirections)
 {
 }
Ejemplo n.º 16
0
 public HeadContext(DefaultChannelPipeline pipeline)
     : base(pipeline, null, "<null>", SkipFlags)
 {
     this.channel = pipeline.Channel();
 }
Ejemplo n.º 17
0
 public HeadContext(DefaultChannelPipeline pipeline)
     : base(pipeline, null, "<null>", SkipPropagationDirections)
 {
     this.channel = pipeline.Channel();
 }