System.Runtime.Remoting.Channels.IChannel Interface

Assembly: Mscorlib.dll
Namespace: System.Runtime.Remoting.Channels
Summary
Provides conduits for messages that cross remoting boundaries.
C# Syntax:
public interface IChannel
Remarks
Remoting boundaries can be Context s, AppDomain s, processes, or computers. An application can cross these boundaries only by using channels. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range protocols, even though the runtime might not be at the other end of the channel.

Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. If there are runtimes at both ends of the channel, a virtual channel is created between the two ends, in order to connect the client and server sink chains on either side of the boundary.

The client part of the channel is located at the end of a client context sink chain. The server part of the channel is located at the start of the server context sink chain. Messages are delivered to the client channel using the IMessageSink interface, travel through the channel, and are then received by the server channel. The server channel delivers the message to the first server context sink.

Channels must expose the IChannel interface, which provides informational properties such as the IChannel.ChannelName and IChannel.ChannelPriority properties. Channels can be registered using the ChannelServices.RegisterChannel method.

See also:
System.Runtime.Remoting.Channels Namespace

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

Public Properties
ChannelName Read-only

Gets the name of the channel.
ChannelPriority Read-only

Gets the priority of the channel.
Public Methods
Parse Returns the object URI as an out parameter, and the URI of the current channel as the return value.

System.Runtime.Remoting.Channels.IChannel Member Details

Property: ChannelName (read-only)
Summary
Gets the name of the channel.
C# Syntax:
string ChannelName {get;}

Return to top


Property: ChannelPriority (read-only)
Summary
Gets the priority of the channel.
C# Syntax:
int ChannelPriority {get;}
Remarks
Higher numbers indicate higher priority, so a channel with priority of 50 has a higher priority than a channel with priority 25. The cross appdomain channel has a priority of 100.

Client channels with higher priority are given the first chance to connect to a remote object specified by a URL or a particular channel data entry from an ObjRef.

For server channels, the priority indicates the order in which their channel data will appear in an ObjRef, which in turn affects the order in which clients will try to connect to the server object. If the server is listening on an HTTP channel with priority 50 and a TCP channel with priority 25 and the client has registered both an HTTP and TCP channel, then the client will use the HTTP channel to talk to the server.

See also:
HttpChannel | HttpServerChannel | HttpClientChannel | TcpChannel | TcpServerChannel | TcpClientChannel

Return to top


Method: Parse(
   string url,
   out string objectURI
)
Summary
Returns the object URI as an out parameter, and the URI of the current channel as the return value.
C# Syntax:
string Parse(
   string url,
   out string objectURI
);
Parameters:

url

The URL of the object.

objectURI

When this method returns, contains a String that holds the object URI. This parameter is passed uninitialized.

Return Value:
The URI of the current channel, or null if the URI does not belong to this channel.
See also:
Uri

Return to top


Top of page

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