Apache.NMS.ActiveMQ.Transport.ResponseCorrelator.Request C# (CSharp) Method

Request() public method

public Request ( Command command, System.TimeSpan timeout ) : Response
command Command
timeout System.TimeSpan
return Apache.NMS.ActiveMQ.Commands.Response
        public override Response Request(Command command, TimeSpan timeout)
        {
            FutureResponse future = AsyncRequest(command);
            future.ResponseTimeout = timeout;
            Response response = future.Response;

            if(response != null && response is ExceptionResponse)
            {
                ExceptionResponse er = response as ExceptionResponse;
                BrokerError brokerError = er.Exception;

                if(brokerError == null)
                {
                    throw new BrokerException();
                }
                else
                {
                    throw new BrokerException(brokerError);
                }
            }

            return response;
        }