/// <summary> /// the active server request interceptors /// </summary> internal ServerRequestInterceptor[] GetServerRequestInterceptors(params IInterceptionOption[] options) { ServerRequestInterceptor[] result; if (m_interceptionRegistrationComplete) { result = m_serverRequestInterceptorsInitalized; } else { // registration incomplete. result = s_emptyServerRequestInterceptors; } if (options.Length > 0) { ServerRequestInterceptor[] oldResult = result; result = new ServerRequestInterceptor[oldResult.Length + options.Length]; for (int i = 0; i < oldResult.Length; i++) { result[i] = oldResult[i]; } for (int i = 0; i < options.Length; i++) { result[oldResult.Length + i] = options[i].GetServerRequestInterceptor(m_orb); } } return(result); }
/// <summary> /// calls send reply interception point. Throws an exception, if an interception point throws /// an exception. /// </summary> internal void SendReply(ServerRequestInfoImpl serverInfo) { while (ProceedToNextInterceptor()) { ServerRequestInterceptor current = GetCurrentInterceptor(); current.send_reply(serverInfo); } }
/// <summary> /// calls receive request interception point. Throws an exception, if an interception point throws /// an exception. internal void ReceiveRequest(ServerRequestInfoImpl serverInfo) { while (ProceedToNextInterceptor()) { ServerRequestInterceptor current = GetCurrentInterceptor(); current.receive_request(serverInfo); } }
public void add_server_request_interceptor(ServerRequestInterceptor interceptor) { if (m_manager.RegistrationComplete) { throw new OBJECT_NOT_EXIST(701, CompletionStatus.Completed_No); } m_manager.add_server_request_interceptor(interceptor); }
/// <summary> /// calls send exception interception point; /// Don't throw exception,if an interception point throws an exception. /// Instead, pass the exception on to the next interception point with send_excpetion. /// </summary> internal Exception SendException(ServerRequestInfoImpl serverInfo, Exception sentException) { Exception result = sentException; if (serverInfo != null) // can be null, if no interception chain available -> don't set in this case // update exception in requestInfo { serverInfo.SetSentException(sentException); } while (ProceedToNextInterceptor()) // proceed either to the begin element in reply chain, or skip failing element { ServerRequestInterceptor current = GetCurrentInterceptor(); try { current.send_exception(serverInfo); } catch (Exception ex) { result = ex; // update exception in requestInfo serverInfo.SetSentException(ex); } } return(result); }
/// <summary> /// adds a server request interceptor to the inactive serverrequest interceptors. Not possible any more /// after registration completed. /// </summary> internal void add_server_request_interceptor(ServerRequestInterceptor interceptor) { lock (this) { if (m_interceptionRegistrationComplete) { throw new BAD_INV_ORDER(701, CompletionStatus.Completed_No); } if (interceptor.Name != null && interceptor.Name != String.Empty) { if (!m_namedServerRequestInterceptors.Contains(interceptor.Name)) { m_namedServerRequestInterceptors[interceptor.Name] = interceptor; } else { throw new DuplicateName(interceptor.Name); } } else { m_unnamedServerRequestInterceptors.Add(interceptor); } } }
/// <summary> /// adds a server request interceptor to the inactive serverrequest interceptors. Not possible any more /// after registration completed. /// </summary> internal void add_server_request_interceptor(ServerRequestInterceptor interceptor) { lock(this) { if (m_interceptionRegistrationComplete) { throw new BAD_INV_ORDER(701, CompletionStatus.Completed_No); } if (interceptor.Name != null && interceptor.Name != String.Empty) { if (!m_namedServerRequestInterceptors.Contains(interceptor.Name)) { m_namedServerRequestInterceptors[interceptor.Name] = interceptor; } else { throw new DuplicateName(interceptor.Name); } } else { m_unnamedServerRequestInterceptors.Add(interceptor); } } }
/// <summary> /// the active server request interceptors /// </summary> internal ServerRequestInterceptor[] GetServerRequestInterceptors(params IInterceptionOption[] options) { ServerRequestInterceptor[] result; if (m_interceptionRegistrationComplete) { result = m_serverRequestInterceptorsInitalized; } else { // registration incomplete. result = s_emptyServerRequestInterceptors; } if (options.Length > 0) { ServerRequestInterceptor[] oldResult = result; result = new ServerRequestInterceptor[oldResult.Length + options.Length]; for (int i = 0; i < oldResult.Length; i++) { result[i] = oldResult[i]; } for (int i = 0; i < options.Length; i++) { result[oldResult.Length + i] = options[i].GetServerRequestInterceptor(m_orb); } } return result; }
internal ServerRequestInterceptionFlow(ServerRequestInterceptor[] interceptors) : base(interceptors) { }
public ZipkinTraceModule(ServerRequestInterceptor requestInterceptor, ServerResponseInterceptor responseInterceptor, ISpanNameProvider spanNameProvider) { this.requestInterceptor = requestInterceptor; this.spanNameProvider = spanNameProvider; this.responseInterceptor = responseInterceptor; }