public virtual void callAsync(T args, string consumerId, CallAsyncDelegateResult <T> resultDelegate, CallAsyncDelegateTimeout <T> timeoutDelegate, int timeout) { Message <T> envelope = new Message <T>(); envelope.Id = (queuePath + "/call-" + callCurId++); envelope.Body = (args); MessageEnvelope argsEnv = envelope.createEnvelope(); argsEnv.Body.MessageUserBody.QueuePath = this.QueuePath; argsEnv.Body.MessageUserBody.ConsumerId = consumerId; IConsumer <T> consumer = null; lock (consumers) { if (!consumers.ContainsKey(consumerId)) { throw new Exception("Consumer with id:" + consumerId + " not found!"); } else { consumer = consumers[consumerId]; } } if (consumer is IRemoteConsumer <T> ) { ITransport consTransport = ((IRemoteConsumer <T>)consumer).NetworkTransport; consTransport.callAsync(argsEnv, new ProxyCallAsyncListener <T>(resultDelegate, timeoutDelegate), timeout); } else { throw new System.Exception("Call enabled only for remote consumer !"); } }
public void callAsync(T args, ITransport forTransport, CallAsyncDelegateResult <T> resultDelegate, CallAsyncDelegateTimeout <T> timeoutDelegate, int timeout) { Message <T> envelope = new Message <T>(); envelope.Id = (this.sessionName + "/call-" + callCurId++); envelope.Body = (args); MessageEnvelope argsEnv = envelope.createEnvelope(); argsEnv.Body.MessageUserBody.QueuePath = (this.sessionName); argsEnv.Body.MessageUserBody.ConsumerId = (this.pointName); forTransport.callAsync(argsEnv, new ProxyCallAsyncListener <T>(resultDelegate, timeoutDelegate), timeout); }
public virtual void callAsync(T args, string consumerId, CallAsyncDelegateResult <T> resultDelegate, CallAsyncDelegateTimeout <T> timeoutDelegate) { callAsync(args, consumerId, resultDelegate, timeoutDelegate, 120); }
public ProxyCallAsyncListener(CallAsyncDelegateResult <T> resultDelegate, CallAsyncDelegateTimeout <T> timeoutDelegate) { this.timeoutDelegate = timeoutDelegate; this.resultDelegate = resultDelegate; }
public void callAsync(T args, CallAsyncDelegateResult <T> resultDelegate, CallAsyncDelegateTimeout <T> timeoutDelegate, int timeout) { callAsync(args, this.transport, resultDelegate, timeoutDelegate, timeout); }
public void callAsync(T args, ITransport forTransport, CallAsyncDelegateResult <T> resultDelegate, CallAsyncDelegateTimeout <T> timeoutDelegate) { callAsync(args, forTransport, resultDelegate, timeoutDelegate, 120); }