From 3089079547c06150d134d8e7569670d49da1f7a3 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 10 Jan 2006 12:26:36 +0000 Subject: [PATCH] moved the Transport API into the Core package and put an initial JMS-like API in place git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@367584 13f79535-47bb-0310-9956-ffa450edef68 --- .../Transport/FutureResponse.cs | 44 ------------------- .../OpenWire.Client/Transport/Transport.cs | 25 ----------- 2 files changed, 69 deletions(-) delete mode 100755 openwire-dotnet/src/OpenWire.Client/Transport/FutureResponse.cs delete mode 100755 openwire-dotnet/src/OpenWire.Client/Transport/Transport.cs diff --git a/openwire-dotnet/src/OpenWire.Client/Transport/FutureResponse.cs b/openwire-dotnet/src/OpenWire.Client/Transport/FutureResponse.cs deleted file mode 100755 index 388a562f7c..0000000000 --- a/openwire-dotnet/src/OpenWire.Client/Transport/FutureResponse.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Threading; - -using OpenWire.Client; -using OpenWire.Client.Commands; - -namespace OpenWire.Client.Transport { - /// - /// Handles asynchronous responses - /// - public class FutureResponse : IAsyncResult { - - private Response response; - private Mutex asyncWaitHandle = new Mutex(); - private bool isCompleted; - - public WaitHandle AsyncWaitHandle { - get { return asyncWaitHandle; } - } - - public object AsyncState { - get { return response; } - set { response = (Response) value; } - } - - public bool IsCompleted { - get { return isCompleted; } - } - - public bool CompletedSynchronously { - get { return false; } - } - - public Response Response { - get { return response; } - set { - asyncWaitHandle.WaitOne(); - response = value; - isCompleted = true; - asyncWaitHandle.ReleaseMutex(); - } - } - } -} diff --git a/openwire-dotnet/src/OpenWire.Client/Transport/Transport.cs b/openwire-dotnet/src/OpenWire.Client/Transport/Transport.cs deleted file mode 100755 index 0b333f90de..0000000000 --- a/openwire-dotnet/src/OpenWire.Client/Transport/Transport.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -using OpenWire.Client; -using OpenWire.Client.Commands; -using OpenWire.Client.Core; - -namespace OpenWire.Client.Transport { - - public delegate void CommandHandler(Transport sender, Command command); - public delegate void ExceptionHandler(Transport sender, Exception command); - - /// - /// Represents the logical networking transport layer. - /// - public interface Transport { - void Oneway(Command command); - - FutureResponse AsyncRequest(Command command); - - Response Request(Command command); - - event CommandHandler Command; - event ExceptionHandler Exception; - } -}