|
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Activation;
using System.Runtime.Remoting.Contexts;
using System.Runtime.Remoting.Messaging;
namespace Touchcom.Prototypes.ContextBoundRemoting
{
public class MessageSink :
IMessageSink
{
IMessageSink nextSink;
Surrogate obj;
public MessageSink(ContextBoundObject obj, IMessageSink nextSink)
{
this.obj = (Surrogate)obj;
this.nextSink = nextSink;
}
public IMessage SyncProcessMessage(IMessage msg)
{
if(msg.Properties["__Uri"] == null)
return this.nextSink.SyncProcessMessage(msg);
else
return this.obj.SyncProcessMessage(msg);
}
public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
{
if(msg.Properties["__Uri"] == null)
return this.nextSink.AsyncProcessMessage(msg, replySink);
else
return this.obj.AsyncProcessMessage(msg, replySink);
}
public IMessageSink NextSink
{
get
{
return this.nextSink;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a consultant, trainer, software archtect/engineer, since the early 1980s, working in the greater area of Boston, MA, USA.
My work comprises the entire spectrum of software, shrink-wrapped applications, IT client-server, systems and protocol related work, compilers and operating systems, and more ....
I am currently focused on platform development for distributed computing in service oriented data centers.