public override void Register(IWampCallee callee, long requestId, RegisterOptions options, string procedure) { InnerAction(callee, authorizer => authorizer.CanRegister(options, procedure), () => base.Register(callee, requestId, options, procedure), exception => callee.RegisterError(requestId, exception)); }
public WampCalleeRpcOperation(string procedure, IWampCallee callee, RegisterOptions options, IWampCalleeInvocationHandler <TMessage> handler, WampCalleeOperationCatalog <TMessage> catalog) : base(callee, procedure, options) { mHandler = handler; mCatalog = catalog; }
public void Unregister(IWampCallee callee, long registrationId) { RemoteWampCalleeDetails operation = new RemoteWampCalleeDetails(callee, registrationId); if (!mOperationToDisposable.TryRemove(operation, out IDisposable disposable)) { throw new WampException(WampErrors.NoSuchRegistration, "registrationId: " + registrationId); } disposable.Dispose(); mInvocationHandler.Unregistered(operation); }
private void ResultArrived(IWampCallee callee, long requestId, YieldOptions options, Action <WampRpcInvocation> action) { WampRpcInvocation invocation = GetInvocation(requestId, options); if (invocation != null) { if (invocation.Operation.Callee == callee) { action(invocation); } else { callee.InvocationError(requestId, mEmptyDetails, WampErrors.NotAuthorized); } } }
public void Cancel(IWampCaller caller, long requestId, CancelOptions options) { WampRpcOperationCallback callback = new WampRpcOperationCallback(caller, requestId); lock (mLock) { if (mCallbackToInvocation.TryGetValue(callback, out WampRpcInvocation invocation)) { IWampCallee callee = invocation.Operation.Callee; callee.Interrupt(invocation.InvocationId, new InterruptDetails() { Mode = options.Mode }); } } }
public void Unregister(IWampCallee callee, long requestId, long registrationId) { try { mCalleeCatalog.Unregister(callee, registrationId); callee.Unregistered(requestId); } catch (WampException exception) { mLogger.ErrorFormat(exception, "Failed unregistering procedure with registration id {RegistrationId}. Unregistration request id: {RequestId} ", registrationId, requestId); callee.UnregisterError(requestId, exception); } }
public void Register(IWampCallee callee, long requestId, RegisterOptions options, string procedure) { try { options = options.WithDefaults(); ValidateRegisterUri(procedure, options.Match); RegisterRequest registerRequest = new RegisterRequest(callee, requestId); mCalleeCatalog.Register(registerRequest, options, procedure); } catch (WampException exception) { mLogger.ErrorFormat(exception, "Failed registering procedure '{ProcedureUri}'. Registration request id: {RequestId} ", procedure, requestId); callee.RegisterError(requestId, exception); } }
public void Register(IWampCallee callee, long requestId, RegisterOptions options, string procedure) { try { options.Invoke = options.Invoke ?? WampInvokePolicy.Default; options.Match = options.Match ?? WampMatchPattern.Default; ValidateRegisterUri(procedure, options.Match); RegisterRequest registerRequest = new RegisterRequest(callee, requestId); mCalleeCatalog.Register(registerRequest, options, procedure); } catch (WampException exception) { mLogger.ErrorFormat(exception, "Failed registering procedure '{0}'. Registration request id: {1} ", procedure, requestId); callee.RegisterError(requestId, exception); } }
public void Yield(IWampCallee callee, long requestId, YieldOptions options, TMessage[] arguments, IDictionary <string, TMessage> argumentsKeywords) { mHandler.Yield(callee, requestId, options, arguments, argumentsKeywords); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options) { mHandler.Yield(callee, requestId, options); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options, TMessage[] arguments) { throw new System.NotImplementedException(); }
public void Register(IWampCallee callee, long requestId, RegisterOptions options, string procedure) { throw new System.NotImplementedException(); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options, TMessage[] arguments) { ActualYield = new object[] { requestId, options, arguments }; }
public void Yield(IWampCallee callee, long requestId, YieldOptions options) { ActualYield = new object[] { requestId, options }; }
protected RemoteWampCalleeDetails(IWampCallee callee, string procedure, RegisterOptions options) { Callee = callee; Procedure = procedure; mOptions = options; }
public RemoteWampCalleeDetails(IWampCallee callee, long registrationId) { Callee = callee; RegistrationId = registrationId; }
public virtual void Yield(IWampCallee callee, long requestId, YieldOptions options) { mDealer.Yield(callee, requestId, options); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options) { ResultArrived(callee, requestId, options, invocation => invocation.Callback.Result(mFormatter, options)); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options, TMessage[] arguments, IDictionary <string, TMessage> argumentsKeywords) { ResultArrived(callee, requestId, options, invocation => invocation.Callback.Result(mFormatter, options, arguments, argumentsKeywords)); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options, TMessage[] arguments, IDictionary <string, TMessage> argumentsKeywords) { ActualYield = new object[] { requestId, options, arguments, argumentsKeywords }; }
public void Error(IWampCallee wampCallee, long requestId, TMessage details, string error) { ErrorArrived(requestId, invocation => invocation.Callback.Error(mFormatter, details, error)); }
public void Register(IWampCallee callee, long requestId, RegisterOptions options, string procedure) { ActualRegistration = new object[] { options, procedure }; mRegisterCallback(callee, requestId); }
public void Unregister(IWampCallee callee, long requestId, long registrationId) { throw new System.NotImplementedException(); }
public void Unregister(IWampCallee callee, long requestId, long registrationId) { ActualUnregistration = new object[] { registrationId }; mUnregisterCallback(callee, requestId); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options, TMessage[] arguments, IDictionary <string, TMessage> argumentsKeywords) { throw new System.NotImplementedException(); }
public RegisterRequest(IWampCallee callee, long requestId) { mCallee = callee; mRequestId = requestId; }
public void Yield(IWampCallee callee, long requestId, YieldOptions options, TMessage[] arguments) { mHandler.Yield(callee, requestId, options, arguments); }
public virtual void Unregister(IWampCallee callee, long requestId, long registrationId) { mDealer.Unregister(callee, requestId, registrationId); }
public void Yield(IWampCallee callee, long requestId, YieldOptions options) { throw new NotImplementedException(); }
public WampCalleeRpcInvocation(IWampCallee callee, long requestId) { Callee = callee; RequestId = requestId; }