System.Runtime.Remoting.Channels.IServerChannelSink Interface

Assembly: Mscorlib.dll
Namespace: System.Runtime.Remoting.Channels
Summary
Provides methods used for security and transport sinks.
C# Syntax:
public interface IServerChannelSink : IChannelSinkBase
Remarks
Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are linked together in a chain of channel sink providers, and all channel messages flow through this chain of sinks before the message is serialized and transported.
See also:
System.Runtime.Remoting.Channels Namespace

System.Runtime.Remoting.Channels.IServerChannelSink Member List:

Public Properties
NextChannelSink Read-only

Gets the next server channel sink in the server sink chain.
Public Methods
AsyncProcessResponse Requests processing from the current sink of the response from a method call sent asynchronously.
GetResponseStream Returns the Stream onto which the provided response message is to be serialized.
ProcessMessage Requests message processing from the current sink.

Hierarchy:


System.Runtime.Remoting.Channels.IServerChannelSink Member Details

Property: NextChannelSink (read-only)
Summary
Gets the next server channel sink in the server sink chain.
C# Syntax:
IServerChannelSink NextChannelSink {get;}
Remarks
Channel sinks are linked together in a chain of sink providers, and all channel messages flow through this chain before the message is serialized and transported.

Return to top


Method: AsyncProcessResponse(
   IServerResponseChannelSinkStack sinkStack,
   object state,
   IMessage msg,
   ITransportHeaders headers,
   Stream stream
)
Summary
Requests processing from the current sink of the response from a method call sent asynchronously.
C# Syntax:
void AsyncProcessResponse(
   IServerResponseChannelSinkStack sinkStack,
   object state,
   IMessage msg,
   ITransportHeaders headers,
   Stream stream
);
Parameters:

sinkStack

A stack of sinks leading back to the server transport sink.

state

Information generated on the request side that is associated with this sink.

msg

The response message.

headers

The headers to add to the return message heading to the client.

stream

The stream heading back to the transport sink.

Remarks
The state parameter contains information that was pushed onto the channel sink stack and associated with the current sink.

Return to top


Method: GetResponseStream(
   IServerResponseChannelSinkStack sinkStack,
   object state,
   IMessage msg,
   ITransportHeaders headers
)
Summary
Returns the Stream onto which the provided response message is to be serialized.
C# Syntax:
Stream GetResponseStream(
   IServerResponseChannelSinkStack sinkStack,
   object state,
   IMessage msg,
   ITransportHeaders headers
);
Parameters:

sinkStack

A stack of sinks leading back to the server transport sink.

state

The state that has been pushed to the stack by this sink.

msg

The response message to serialize.

headers

The headers to put in the response stream to the client.

Return Value:
The Stream onto which the provided response message is to be serialized.
Remarks
This method is called when a response stream needs to be created.

Return to top


Method: ProcessMessage(
   IServerChannelSinkStack sinkStack,
   IMessage requestMsg,
   ITransportHeaders requestHeaders,
   Stream requestStream,
   out IMessage responseMsg,
   out ITransportHeaders responseHeaders,
   out Stream responseStream
)
Summary
Requests message processing from the current sink.
C# Syntax:
ServerProcessing ProcessMessage(
   IServerChannelSinkStack sinkStack,
   IMessage requestMsg,
   ITransportHeaders requestHeaders,
   Stream requestStream,
   out IMessage responseMsg,
   out ITransportHeaders responseHeaders,
   out Stream responseStream
);
Parameters:

sinkStack

A stack of channel sinks that called the current sink.

requestMsg

The message that contains the request.

requestHeaders

Headers retrieved from the incoming message from the client.

requestStream

The stream that needs to be to processed and passed on to the deserialization sink.

responseMsg

When this method returns, contains an IMessage that holds the response message. This parameter is passed uninitialized.

responseHeaders

When this method returns, contains an ITransportHeaders that holds the headers that are to be added to return message heading to the client. This parameter is passed uninitialized.

responseStream

When this method returns, contains a Stream that is heading back to the transport sink. This parameter is passed uninitialized.

Return Value:
A ServerProcessing status value that provides information about how message was processed.
Remarks
The job of a proxy is to convert a method call invoked on it into a message object. This message object, which implements the IMessage interface, is passed from the client end to the server end by invoking IServerChannelSink.ProcessMessage on message sink objects. Message sinks are chained together in the sense that every message sink is responsible for calling IServerChannelSink.ProcessMessage on the next message sink after it has performed its work. For instance, a synchronization related message sink can cause a lock to be acquired or released, and then delegated further to the downstream message sink.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.