IReplyChannel 介面

定義

定義通道必須實作的介面,這個介面會出現在傳訊端點之間要求–回覆通訊的接收端上。Defines the interface that a channel must implement to be on the receiving side of a request-reply communication between messaging endpoints.

public interface class IReplyChannel : System::ServiceModel::Channels::IChannel
public interface IReplyChannel : System.ServiceModel.Channels.IChannel
type IReplyChannel = interface
    interface IChannel
    interface ICommunicationObject
Public Interface IReplyChannel
Implements IChannel
衍生
實作

備註

重要

呼叫實作此介面之類別的方法時,若並用了不信任的資料,會造成安全性上的風險。Calling methods from classes that implement this interface with untrusted data is a security risk. 呼叫實作此介面之類別的方法時,請一律使用信任的資料。Call the methods from classes that implement this interface only with trusted data. 如需詳細資訊,請參閱資料驗證For more information, see Data Validation.

IReplyChannel 介面包括 ReceiveRequest 方法的同步和非同步等變體,這些變體所傳回的 RequestContext 可以用來回覆所收到的要求。The IReplyChannel interface includes synchronous and asynchronous variants of a ReceiveRequest method return an RequestContext that can be used to construct replies to received requests.

此合約包括接收、嘗試接收 (try-to-receive) 和等候訊息 (wait-for-a-message) 功能的同步和非同步等變體。The contract includes synchronous and asynchronous variants of receive, try-to-receive and wait-for-a-message functionality.

IReplyChannel 不一定要繫結到單一寄件人。An IReplyChannel is not necessarily bound to a single sender. 其他的通道和通道介面可以提供特定寄件人和回覆通道之間的相互關聯,但是基底合約並未提供這類限制。Other channels and channel interfaces provide correlation between the sender and the reply channel, but the base contract makes no such restriction.

提取模型會配合 IReplyChannel 使用來接收訊息。The pull model is used with an IReplyChannel to receive messages. 這個模型的組成包括呼叫 ReceiveRequest (或其中一種變體),然後等候訊息的到達。This model consists of calling ReceiveRequest (or one of its variants) and then waiting for a message to arrive.

屬性

LocalAddress

取得回覆通道接收訊息的位址。Gets the address on which this reply channel receives messages.

State

取得通訊導向物件的目前狀態。Gets the current state of the communication-oriented object.

(繼承來源 ICommunicationObject)

方法

Abort()

導致通訊物件立即從目前的狀態轉換為已關閉狀態。Causes a communication object to transition immediately from its current state into the closed state.

(繼承來源 ICommunicationObject)
BeginClose(AsyncCallback, Object)

開始非同步作業以關閉通訊物件。Begins an asynchronous operation to close a communication object.

(繼承來源 ICommunicationObject)
BeginClose(TimeSpan, AsyncCallback, Object)

開始非同步作業,關閉有已指定逾時的通訊物件。Begins an asynchronous operation to close a communication object with a specified timeout.

(繼承來源 ICommunicationObject)
BeginOpen(AsyncCallback, Object)

開始非同步作業以開啟通訊物件。Begins an asynchronous operation to open a communication object.

(繼承來源 ICommunicationObject)
BeginOpen(TimeSpan, AsyncCallback, Object)

開始非同步作業,開啟有已指定時間間隔的通訊物件。Begins an asynchronous operation to open a communication object within a specified interval of time.

(繼承來源 ICommunicationObject)
BeginReceiveRequest(AsyncCallback, Object)

開始非同步作業,接收有預設逾時的可用要求。Begins an asynchronous operation to receive an available request with a default timeout.

BeginReceiveRequest(TimeSpan, AsyncCallback, Object)

開始非同步作業,接收有已指定逾時的可用要求。Begins an asynchronous operation to receive an available request with a specified timeout.

BeginTryReceiveRequest(TimeSpan, AsyncCallback, Object)

開始非同步的作業,接收具有已指定逾時以及與該作業關聯之狀態物件的要求訊息。Begins an asynchronous operation to receive a request message that has a specified time out and state object associated with it.

BeginWaitForRequest(TimeSpan, AsyncCallback, Object)

開始非同步的要求作業,這項作業具有已指定逾時以及與該作業關聯之狀態物件的訊息。Begins an asynchronous request operation that has a specified time out and state object associated with it.

Close()

導致通訊物件從目前的狀態轉換已關閉狀態。Causes a communication object to transition from its current state into the closed state.

(繼承來源 ICommunicationObject)
Close(TimeSpan)

導致通訊物件從目前的狀態轉換已關閉狀態。Causes a communication object to transition from its current state into the closed state.

(繼承來源 ICommunicationObject)
EndClose(IAsyncResult)

完成非同步作業以關閉通訊物件。Completes an asynchronous operation to close a communication object.

(繼承來源 ICommunicationObject)
EndOpen(IAsyncResult)

完成非同步作業以開啟通訊物件。Completes an asynchronous operation to open a communication object.

(繼承來源 ICommunicationObject)
EndReceiveRequest(IAsyncResult)

完成非同步作業,接收可用的要求。Completes an asynchronous operation to receive an available request.

EndTryReceiveRequest(IAsyncResult, RequestContext)

完成指定的非同步作業,以便接收要求訊息。Completes the specified asynchronous operation to receive a request message.

EndWaitForRequest(IAsyncResult)

完成指定的非同步「等候要求」(wait-for-a-request) 作業。Completes the specified asynchronous wait-for-a-request message operation.

GetProperty<T>()

從通道堆疊的適當層次中,傳回要求的型別物件 (如果有)。Returns a typed object requested, if present, from the appropriate layer in the channel stack.

(繼承來源 IChannel)
Open()

導致通訊物件從已建立狀態轉換為已開啟狀態。Causes a communication object to transition from the created state into the opened state.

(繼承來源 ICommunicationObject)
Open(TimeSpan)

在指定時間間隔內,讓通訊物件從已建立狀態轉換為已開啟狀態。Causes a communication object to transition from the created state into the opened state within a specified interval of time.

(繼承來源 ICommunicationObject)
ReceiveRequest()

如果有收到可用的要求,則將該要求的內容傳回。Returns the context of the request received, if one is available. 如果無法取得內容,請等候直到有可用內容為止。If a context is not available, waits until there is one available.

ReceiveRequest(TimeSpan)

如果有收到可用的要求,則將該要求的內容傳回。Returns the context of the request received, if one is available. 如果無法取得內容,請等候直到有可用內容為止。If a context is not available, waits until there is one available.

TryReceiveRequest(TimeSpan, RequestContext)

傳回值,這個值會表示要求是否是在超過已指定時間間隔之前所接收。Returns a value that indicates whether a request is received before a specified interval of time elapses.

WaitForRequest(TimeSpan)

傳回值,這個值會表示要求訊息是否是在超過已指定時間間隔之前所接收。Returns a value that indicates whether a request message is received before a specified interval of time elapses.

事件

Closed

當通訊物件從關閉中狀態轉換為已關閉狀態完成時發生。Occurs when the communication object completes its transition from the closing state into the closed state.

(繼承來源 ICommunicationObject)
Closing

當通訊物件第一次進入關閉中狀態時發生。Occurs when the communication object first enters the closing state.

(繼承來源 ICommunicationObject)
Faulted

當通訊物件第一次進入錯誤狀態時發生。Occurs when the communication object first enters the faulted state.

(繼承來源 ICommunicationObject)
Opened

當通訊物件從開啟中狀態轉換為已開啟狀態結束時發生。Occurs when the communication object completes its transition from the opening state into the opened state.

(繼承來源 ICommunicationObject)
Opening

當通訊物件第一次進入開啟中狀態時發生。Occurs when the communication object first enters the opening state.

(繼承來源 ICommunicationObject)

適用於