ChannelListenerBase 类

定义

提供服务上的通道侦听器的通用基实现。Provides a common base implementation for channel listeners on the service.

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

注解

服务上的通道侦听器等待然后接受客户端上的工厂创建的通道。The channel listeners on the service wait for and then accept the channels created by factories on the client. 一旦在客户端和服务之间建立了通道连接,消息就可以进行交换,分布式应用程序就可以进行通信。Once the channel connection is established between client and service, messages can be exchanged and distributed applications can communicate. 侦听器提供的处理功能分为一组堆积通道侦听器,以便在选择要部署的 Windows Communication Foundation (WCF) 功能时提供模块化。The processing functionality provided by the listener is layered into a stacked set of channel listeners to provide modularity when selecting the Windows Communication Foundation (WCF) features to deploy. 服务堆栈中的每个通道侦听器都对应于客户端堆栈中的某个通道工厂。Each channel listener in the service stack corresponds to a channel factory in the client stack. 工厂创建的通道是真实的通道堆栈,这些通道由服务上的侦听器堆栈接受并处理。The channel created by the factory is really a stack of channels that are accepted and processed by the stack of listeners on the service.

构造函数

ChannelListenerBase()

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

ChannelListenerBase(IDefaultCommunicationTimeouts)

使用指定的默认通信超时初始化 ChannelListenerBase 类的新实例。Initializes a new instance of the ChannelListenerBase class with specified default communication timeouts.

属性

DefaultCloseTimeout

获取为完成关闭操作提供的默认时间间隔。Gets the default interval of time provided for a close operation to complete.

DefaultOpenTimeout

获取为完成打开操作提供的默认时间间隔。Gets the default interval of time provided for an open operation to complete.

DefaultReceiveTimeout

获取为完成接收操作提供的默认时间间隔。Gets the default interval of time provided for a receive operation to complete.

DefaultSendTimeout

获取为完成发送操作提供的默认时间间隔。Gets the default interval of time provided for a send operation to complete.

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)
Uri

在派生类中实现时,获取通道侦听器为传入通道侦听的 URI。When implemented in derived class, gets the URI on which the channel listener listens for an incoming channel.

方法

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)
BeginWaitForChannel(TimeSpan, AsyncCallback, Object)

在派生类中实现时,开始一个等待通道到达的异步操作。When implemented in a derived class, begins an asynchronous operation to wait for a channel to arrive.

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)
EndWaitForChannel(IAsyncResult)

在派生类中实现时,完成一个等待通道到达的异步操作。When implemented in a derived class, completes an asynchronous operation to wait for channels to arrive.

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)
GetProperty<T>()

从通道堆栈的适当层返回所请求的类型化对象(如果存在)。Returns a typed object requested, if present, from the appropriate layer in the channel stack.

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)
OnBeginWaitForChannel(TimeSpan, AsyncCallback, Object)

在派生类中实现时,在开始等待通道到达时提供一个可扩展点。When implemented in a derived class, provides a point of extensibility when starting to wait for a channel to arrive.

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)
OnEndWaitForChannel(IAsyncResult)

在派生类中实现时,在结束等待通道到达时提供一个可扩展点。When implemented in a derived class, provides a point of extensibility when ending the waiting for a channel to arrive.

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)
OnWaitForChannel(TimeSpan)

在派生类中重写时,在等待通道到达时提供一个可扩展点。When overridden in a derived class, provides a point of extensibility when waiting for a channel to arrive.

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)
WaitForChannel(TimeSpan)

在派生类中实现时,等待通道到达。When implemented in a derived class, waits for a channel to arrive.

事件

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.

(继承自 ChannelManagerBase)
IDefaultCommunicationTimeouts.OpenTimeout

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

(继承自 ChannelManagerBase)
IDefaultCommunicationTimeouts.ReceiveTimeout

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

(继承自 ChannelManagerBase)
IDefaultCommunicationTimeouts.SendTimeout

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

(继承自 ChannelManagerBase)

适用于