ChannelManagerBase 类

定义

提供基实现,用以管理与通道和侦听器工厂关联的默认超时。Provides a base implementation for managing the default timeouts that are associated with channel and listener factories.

public ref class ChannelManagerBase abstract : System::ServiceModel::Channels::CommunicationObject, System::ServiceModel::IDefaultCommunicationTimeouts
public abstract class ChannelManagerBase : System.ServiceModel.Channels.CommunicationObject, System.ServiceModel.IDefaultCommunicationTimeouts
type ChannelManagerBase = class
    inherit CommunicationObject
    interface IDefaultCommunicationTimeouts
type ChannelManagerBase = class
    inherit CommunicationObject
    interface ICommunicationObject
    interface IDefaultCommunicationTimeouts
Public MustInherit Class ChannelManagerBase
Inherits CommunicationObject
Implements IDefaultCommunicationTimeouts
继承
ChannelManagerBase
派生
实现

注解

具体来说,此类会提供 ChannelFactoryBaseChannelListenerBase 通道管理器类的通用基实现,用以管理与通道工厂和侦听器关联的默认超时。Specifically, this class provides a common base implementation for the ChannelFactoryBase and ChannelListenerBase channel manager classes for managing the default timeouts that are associated with the channel factories and listeners. 通道是使用 CreateChannel 方法之一,添加到由管理器维护的列表中。Channels are added to the list maintained by the manager by using one of the CreateChannel methods. 供生成的通道和侦听器使用的发送和接收超时的抽象属性,是指定用来协调为派生的通道和侦听器工厂设置的值。Abstract properties for send and receive timeouts used by the channels and listeners that are produced are specified to coordinate the values set for the derived channel and listener factories.

为自定义通道提供基实现的 ChannelBase 会从与之关联的 ChannelManagerBase 获取打开、关闭、发送和接收操作的默认通信超时。The ChannelBase, which provides the base implementation for custom channels, gets its default communication timeouts for the open, close, send and receive operations from the ChannelManagerBase associated with it.

ChannelBase 还负责对管理器加以管理。The ChannelBase also takes care of managing the manager for you. 除了公开对管理器的引用之外,该基类还会在创建和销毁通道时通知管理器。In addition to exposing a reference to the manager, the base class also notifies the manager when channels are created and destroyed. 但是对管理器的引用只在销毁通道之前有效。But the reference to the manager is only good until the channel is destroyed.

构造函数

ChannelManagerBase()

初始化 ChannelManagerBase 类的新实例。Initializes a new instance of the ChannelManagerBase class.

属性

DefaultCloseTimeout

在派生类中重写时,获取为完成关闭操作提供的默认时间间隔。When overridden in a derived class, gets the default interval of time provided for a close operation to complete.

(继承自 CommunicationObject)
DefaultOpenTimeout

在派生类中重写时,获取为完成打开操作提供的默认时间间隔。When overridden in a derived class, gets the default interval of time provided for an open operation to complete.

(继承自 CommunicationObject)
DefaultReceiveTimeout

在派生类中重写时,获取通道必须完成消息接收的默认时间间隔。When overridden in a derived class, gets the default interval of time a channel has to complete the reception of a message.

DefaultSendTimeout

在派生类中重写时,获取通道必须完成消息发送的默认时间间隔。When overridden in a derived class, gets the default interval of time a channel has to complete the sending of a message.

IsDisposed

获取一个值,该值指示通信对象是否已被释放。Gets a value that indicates whether the communication object has been disposed.

(继承自 CommunicationObject)
State

获取指示通信对象当前状态的值。Gets a value that indicates the current state of the communication object.

(继承自 CommunicationObject)
ThisLock

获取在状态转换过程中保护类实例的相互排斥锁。Gets the mutually exclusive lock that protects the class instance during a state transition.

(继承自 CommunicationObject)

方法

Abort()

使通信对象立即从其当前状态转换到正在关闭状态。Causes a communication object to transition immediately from its current state into the closing state.

(继承自 CommunicationObject)
BeginClose(AsyncCallback, Object)

开始一个异步操作以关闭通信对象。Begins an asynchronous operation to close a communication object.

(继承自 CommunicationObject)
BeginClose(TimeSpan, AsyncCallback, Object)

开始一个异步操作以在指定超时内关闭通信对象。Begins an asynchronous operation to close a communication object with a specified timeout.

(继承自 CommunicationObject)
BeginOpen(AsyncCallback, Object)

开始一个异步操作以打开通信对象。Begins an asynchronous operation to open a communication object.

(继承自 CommunicationObject)
BeginOpen(TimeSpan, AsyncCallback, Object)

开始一个异步操作以在指定时间间隔内打开通信对象。Begins an asynchronous operation to open a communication object within a specified interval of time.

(继承自 CommunicationObject)
Close()

使通信对象从其当前状态转换到关闭状态。Causes a communication object to transition from its current state into the closed state.

(继承自 CommunicationObject)
Close(TimeSpan)

使通信对象在指定时间间隔内从当前状态转换到关闭状态。Causes a communication object to transition from its current state into the closed state within a specified interval of time.

(继承自 CommunicationObject)
EndClose(IAsyncResult)

完成一个异步操作以关闭通信对象。Completes an asynchronous operation to close a communication object.

(继承自 CommunicationObject)
EndOpen(IAsyncResult)

完成一个异步操作以打开通信对象。Completes an asynchronous operation to open a communication object.

(继承自 CommunicationObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Fault()

使通信对象从其当前状态转换到出错状态。Causes a communication object to transition from its current state into the faulted state.

(继承自 CommunicationObject)
GetCommunicationObjectType()

获取通信对象的类型。Gets the type of communication object.

(继承自 CommunicationObject)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnAbort()

在调用了一个同步中止操作,从而引起通信对象转换为关闭状态的情况下,该方法插入对通信对象的处理。Inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous abort operation.

(继承自 CommunicationObject)
OnBeginClose(TimeSpan, AsyncCallback, Object)

在调用了异步关闭操作,从而引起通信对象转换为正在关闭状态的情况下,该方法将插入处理。Inserts processing after a communication object transitions to the closing state due to the invocation of an asynchronous close operation.

(继承自 CommunicationObject)
OnBeginOpen(TimeSpan, AsyncCallback, Object)

在调用了异步打开操作,从而引起通信对象转换为正在打开状态的情况下,该方法将插入处理。Inserts processing on a communication object after it transitions to the opening state due to the invocation of an asynchronous open operation.

(继承自 CommunicationObject)
OnClose(TimeSpan)

在调用了一个同步关闭操作,从而引起通信对象转换为正在关闭状态的情况下,该方法插入对通信对象的处理。Inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous close operation.

(继承自 CommunicationObject)
OnClosed()

在通信对象转换到正在关闭状态的过程中被调用。Invoked during the transition of a communication object into the closing state.

(继承自 CommunicationObject)
OnClosing()

在通信对象转换到正在关闭状态的过程中被调用。Invoked during the transition of a communication object into the closing state.

(继承自 CommunicationObject)
OnEndClose(IAsyncResult)

在关闭通信对象时完成一个异步操作。Completes an asynchronous operation on the close of a communication object.

(继承自 CommunicationObject)
OnEndOpen(IAsyncResult)

在打开通信对象时完成一个异步操作。Completes an asynchronous operation on the open of a communication object.

(继承自 CommunicationObject)
OnFaulted()

在调用了同步错误操作,从而引起通信对象转换为出错状态的情况下,该方法插入对通信对象的处理。Inserts processing on a communication object after it transitions to the faulted state due to the invocation of a synchronous fault operation.

(继承自 CommunicationObject)
OnOpen(TimeSpan)

在通信对象转换为打开状态(此过程必须在指定时间间隔内完成)后插入对通信对象的处理。Inserts processing on a communication object after it transitions into the opening state which must complete within a specified interval of time.

(继承自 CommunicationObject)
OnOpened()

在通信对象转换到已打开状态的过程中被调用。Invoked during the transition of a communication object into the opened state.

(继承自 CommunicationObject)
OnOpening()

在通信对象转换到正在打开状态的过程中被调用。Invoked during the transition of a communication object into the opening state.

(继承自 CommunicationObject)
Open()

使通信对象从已创建状态转换到已打开状态。Causes a communication object to transition from the created state into the opened state.

(继承自 CommunicationObject)
Open(TimeSpan)

使通信对象在指定时间间隔内从已创建状态转换到已打开状态。Causes a communication object to transition from the created state into the opened state within a specified interval of time.

(继承自 CommunicationObject)
ThrowIfDisposed()

如果通信对象已释放,则引发异常。Throws an exception if the communication object is disposed.

(继承自 CommunicationObject)
ThrowIfDisposedOrImmutable()

如果通信对象的 State 属性未设置为 Created 状态,则引发异常。Throws an exception if the communication object the State property is not set to the Created state.

(继承自 CommunicationObject)
ThrowIfDisposedOrNotOpen()

如果通信对象未处于 Opened 状态,则引发异常。Throws an exception if the communication object is not in the Opened state.

(继承自 CommunicationObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

事件

Closed

当通信对象转换到已关闭状态时发生。Occurs when a communication object transitions into the closed state.

(继承自 CommunicationObject)
Closing

当通信对象转换到正在关闭状态时发生。Occurs when a communication object transitions into the closing state.

(继承自 CommunicationObject)
Faulted

在通信对象转换到出错状态时发生。Occurs when a communication object transitions into the faulted state.

(继承自 CommunicationObject)
Opened

当通信对象转换到已打开状态时发生。Occurs when a communication object transitions into the opened state.

(继承自 CommunicationObject)
Opening

当通信对象转换到正在打开状态时发生。Occurs when a communication object transitions into the opening state.

(继承自 CommunicationObject)

显式接口实现

IDefaultCommunicationTimeouts.CloseTimeout

获取 close 方法(由通信对象调用)在超时之前的时间间隔。Gets the interval of time after which the close method, invoked by a communication object, times out.

IDefaultCommunicationTimeouts.OpenTimeout

获取 open 方法(由通信对象调用)在超时之前的时间间隔。Gets the interval of time after which the open method, invoked by a communication object, times out.

IDefaultCommunicationTimeouts.ReceiveTimeout

获取 receive 方法(由通信对象调用)在超时之前的时间间隔。Gets the interval of time after which the receive method, invoked by a communication object, times out.

IDefaultCommunicationTimeouts.SendTimeout

获取 send 方法(由通信对象调用)在超时之前的时间间隔。Gets the interval of time after which the send method, invoked by a communication object, times out.

适用于