Click here to Skip to main content
15,884,473 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 262.5K   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>
	/// Callback interface which command executives use to notify container
	/// when a command is received.
	/// 
	/// This interface is implemented by those who contains ICommandExecutor
	/// </summary>
	public interface ICommandExecutorListener
	{
		/// <summary>
		/// Receive a command from command executor
		/// </summary>
		/// <param name="command">The command received</param>
		void Receive( ICommand command );

		/// <summary>
		/// Remvoe the command executor from the command bus
		/// </summary>
		/// <param name="executor"></param>
		void Remove( ICommandExecutor executor );
	}
}

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