System.Runtime.Remoting.MetadataServices.SdlChannelSink Class

Assembly: System.Runtime.Remoting.dll
Namespace: System.Runtime.Remoting.MetadataServices
Summary
Provides the implementation for a server channel sink that generates Web Services Description Language (WSDL) dynamically on the server.
C# Syntax:
public class SdlChannelSink : IServerChannelSink, IChannelSinkBase
Remarks
The SdlChannelSink is used to create WSDL in situations where the URL ends with the string "?wsdl".
See also:
System.Runtime.Remoting.MetadataServices Namespace See also:
MSDN: webservicedescription

System.Runtime.Remoting.MetadataServices.SdlChannelSink Member List:

Public Constructors
ctor #1 Initializes a new instance of the SdlChannelSink class.
Public Properties
NextChannelSink Read-only

Gets the next IServerChannelSink in the sink chain.
Properties Read-only

Gets an IDictionary of properties for the current channel sink.
Public Methods
AsyncProcessResponse Requests processing from the current sink of the response from a method call sent asynchronously.
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetResponseStream Returns the Stream onto which the provided response message is to be serialized.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ProcessMessage Requests message processing from the current sink.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Runtime.Remoting.MetadataServices.SdlChannelSink Member Details

ctor #1
Summary
Initializes a new instance of the SdlChannelSink class.
C# Syntax:
public SdlChannelSink(
   IChannelReceiver receiver,
   IServerChannelSink nextSink
);
Parameters:

receiver

Indicates the channel that will receive the messages serialized by the new instance of SdlChannelSink.

nextSink

The next sink in the sink chain.

Return to top


Property: NextChannelSink (read-only)
Summary
Gets the next IServerChannelSink in the sink chain.
C# Syntax:
public IServerChannelSink NextChannelSink {get;}
Implements:
IServerChannelSink.NextChannelSink

Return to top


Property: Properties (read-only)
Summary
Gets an IDictionary of properties for the current channel sink.
C# Syntax:
public IDictionary Properties {get;}
Implements:
IChannelSinkBase.Properties
Remarks


Note For more information, see the conceptual topic at MSDN: channelformatterconfigurationproperties.
See also:
MSDN: channelformatterconfigurationproperties

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:
public 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 associated with the current sink, generated on the request side, and needed on the response side.

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.

Implements:
IServerChannelSink.AsyncProcessResponse

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~SdlChannelSink();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

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:
public Stream GetResponseStream(
   IServerResponseChannelSinkStack sinkStack,
   object state,
   IMessage msg,
   ITransportHeaders headers
);
Parameters:

sinkStack

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

state

Information associated with the current sink, generated on the request side, and needed on the response side.

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.
Implements:
IServerChannelSink.GetResponseStream
Remarks
The current method is called when a response stream needs to be created.
See also:
MSDN: sinkssinkchains

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

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:
public 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

The headers retrieved from the incoming message from the client.

requestStream

The stream that needs to be 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 to add to return message heading to the client. This parameter is passed uninitialized.

responseStream

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

Return Value:
A ServerProcessing status value that provides information about how the message was processed.
Implements:
IServerChannelSink.ProcessMessage
Remarks
The proxy's job is to convert a method call invoked on it into a message object. The 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, which means 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 might cause a lock to be acquired or released and delegated to the downstream message sink.

When the formatter channel sink gets a message that needs to be sent over the channel, it calls IMessageSink.SyncProcessMessage, passing the message as a parameter. The formatter sink then creates the transport header array and calls IClientChannelSink.GetRequestStream on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, IClientChannelSink.ProcessMessage is called on the first chain in the sink chain, and the message is passed to the channel sinks.

After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed.

When the message reaches the server side, the transport sink retrieves the headers and serialized message from the stream and forwards these through the sink chain until they reach the formatter sink. The formatter sink then deserializes the message and forwards it to remoting, where the message is turned into a method call and the server object is called.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

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