Click here to Skip to main content
15,895,740 members
Articles / Programming Languages / C#

Distributed Command Pattern - an extension of command pattern for connected systems

Rate me:
Please Sign up or sign in to vote.
4.87/5 (74 votes)
25 Jan 2005CPOL16 min read 263.2K   2.7K   252  
Distributed Command Pattern is a pattern for connected systems which implements command pattern. It frees designers from thinking about the communication and helps them concentrate on implementing commands as if it is a regular desktop application. The framework takes care of the communication.
using System;

namespace DistributedCommand.Framework
{
	/// <summary>
	/// Interface for transporter callback receiver. All transporters
	/// use this interface to inform listeners what data arrives
	/// </summary>
	public interface ITransporterListener
	{
		/// <summary>
		/// When data arrives, this method is called to notify and 
		/// specify the data
		/// </summary>
		/// <param name="data"></param>
		/// <param name="source"></param>
		void Received( object data, ITransporter source );

		/// <summary>
		/// When underlying transporter is closed, this method is called
		/// </summary>
		/// <param name="source"></param>
		void Closed( ITransporter source );
	}
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect BT, UK (ex British Telecom)
United Kingdom United Kingdom

Comments and Discussions