Ejemplo n.º 1
0
 public override void Dispose()
 {
     lock (this)
     {
         _disposed = true;
         _channel.close();
     }
 }
Ejemplo n.º 2
0
        public override void Close()
        {
            Channel rawChannel = rawChannel();

            if (rawChannel.Open)
            {
                rawChannel.close().syncUninterruptibly();
            }
        }
Ejemplo n.º 3
0
 public override void Dispose()
 {
     lock (this)
     {
         _log.info("Disposing channel: " + _channel);
         _disposed = true;
         _channel.close();
     }
 }
Ejemplo n.º 4
0
        private static Channel ChannelMock(bool open)
        {
            Channel channel = mock(typeof(Channel));

            when(channel.Open).thenReturn(open);
            ChannelFuture channelFuture = mock(typeof(ChannelFuture));

            when(channel.close()).thenReturn(channelFuture);
            return(channel);
        }
Ejemplo n.º 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @After public void tearDown() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void TearDown()
        {
            if (_server != null)
            {
                _server.stop();
                _server.shutdown();
            }
            if (_channel != null)
            {
                _channel.close();
            }
        }