ChannelListenerBase<TChannel> 类

定义

为服务上的通道侦听器提供通用的基实现,以接受客户端工厂生成的通道。Provides a common base implementation for channel listeners on a service to accept channels produced by the client factories.

generic <typename TChannel>
 where TChannel : class, IChannelpublic ref class ChannelListenerBase abstract : System::ServiceModel::Channels::ChannelListenerBase, System::ServiceModel::Channels::IChannelListener<TChannel>
public abstract class ChannelListenerBase<TChannel> : System.ServiceModel.Channels.ChannelListenerBase, System.ServiceModel.Channels.IChannelListener<TChannel> where TChannel : class, IChannel
type ChannelListenerBase<'Channel (requires 'Channel : null and 'Channel :> IChannel)> = class
    inherit ChannelListenerBase
    interface IChannelListener<'Channel (requires 'Channel : null and 'Channel :> IChannel)>
    interface IChannelListener
    interface ICommunicationObject
Public MustInherit Class ChannelListenerBase(Of TChannel)
Inherits ChannelListenerBase
Implements IChannelListener(Of TChannel)

类型参数

TChannel

通道侦听器接受的通道类型。The type of channel the channel listeners accept.

继承
实现

注解

服务上的通道侦听器等待,然后接受客户端上的工厂创建的通道。The channel listeners on a service wait for and then accept the channels created by factories on the client. 一旦客户端和服务之间建立了通道连接,它们就可以通过交换消息来进行通信。Once the channel connection is established between client and service, they can communicate by exchanging messages

构造函数

ChannelListenerBase<TChannel>()

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

ChannelListenerBase<TChannel>(IDefaultCommunicationTimeouts)

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

属性

DefaultCloseTimeout

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

(继承自 ChannelListenerBase)
DefaultOpenTimeout

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

(继承自 ChannelListenerBase)
DefaultReceiveTimeout

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

(继承自 ChannelListenerBase)
DefaultSendTimeout

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

(继承自 ChannelListenerBase)
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.

(继承自 ChannelListenerBase)

方法

Abort()

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

(继承自 CommunicationObject)
AcceptChannel()

接受当前通道侦听器指定的类型的通道。Accepts a channel of the type specified by the current channel listener.

AcceptChannel(TimeSpan)

在指定时间间隔内接受当前通道侦听器指定的类型的通道。Accepts a channel of the type specified by the current channel listener within a specified interval of time.

BeginAcceptChannel(AsyncCallback, Object)

开始一个异步操作,以接受当前通道侦听器指定的类型的通道。Begins an asynchronous operation to accept a channel of the type specified by the current channel listener.

BeginAcceptChannel(TimeSpan, AsyncCallback, Object)

当在派生类中实现时,开始一个异步操作以在指定时间间隔内接受当前通道侦听器指定的类型的通道。When implemented in a derived class, begins an asynchronous operation to accept a channel of the type specified by the current channel listener within a specified interval of time.

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.

(继承自 ChannelListenerBase)
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)
EndAcceptChannel(IAsyncResult)

当在派生类中实现时,完成异步操作以接受通道。When implemented in a derived class, completes an asynchronous operation to accept a channel.

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.

(继承自 ChannelListenerBase)
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.

(继承自 ChannelListenerBase)
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)
OnAcceptChannel(TimeSpan)

在派生类中实现时,在接受通道时提供一个可扩展点。When implemented in a derived class, provides an extensibility point when accepting a channel.

OnBeginAcceptChannel(TimeSpan, AsyncCallback, Object)

在派生类中实现时,在开始接受通道时提供一个异步可扩展点。When implemented in a derived class, provides an asynchronous extensibility point when beginning to accept a channel.

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.

(继承自 ChannelListenerBase)
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)
OnEndAcceptChannel(IAsyncResult)

在派生类中实现时,在完成接受通道时提供一个异步可扩展点。When implemented in a derived class, provides an asynchronous extensibility point when completing the acceptance a channel.

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.

(继承自 ChannelListenerBase)
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.

(继承自 ChannelListenerBase)
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()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)
WaitForChannel(TimeSpan)

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

(继承自 ChannelListenerBase)

事件

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)

适用于