这样,即使不轮询,客户机也始终处于等待模拟异步通知的Web服务响应的状态。
In this way, even without polling, the client is always in a state waiting for a response from the Web service, which simulates an asynchronous notification.
系统接口随后将到中介的连接保持为打开状态,并将请求以同步方式传递给目标系统,然后在相同连接上等待响应。
The System Interface then keeps the connection to the Mediator open and passes the request on synchronously to the destination System and waits for the response on the same connection.
这是因为大多数套接字操作都是异步地进行的,其中套接字进行轮询以检查数据是否出现,而不是使得应用程序处于阻塞(等待)状态以等待响应。
This is because most socket operations are made asynchronously in that the socket is polled to see if data is present rather than having the application block (wait) for the response.
您的应用程序是不是很空闲,焦虑地等待用户发送请求,然后它传回响应,再返回休眠状态,直到下次调用。
Your application sits idle, anxiously waiting for the user to send in a request. It passes back the response and then goes back to sleep until the next call.
在坚持使用请求/响应模型的同时,您可以使用非阻塞I/O(NIO)来保持连接的打开状态,而不需要浪费等待线程。
While sticking with the request/response model, you can use Non-Blocking I/O (NIO) to keep a connection open without wasting waiting threads.
如果信号量不可用,它将被置为睡眠状态;如果向它传递了一个致命信号,则会将它从等待者列表中删除,并且需要响应此信号。
If the semaphore is not available, it's put to sleep; if a fatal signal is delivered to it, it would be removed from the waiters' list and would have to respond to the signal.
但是发生该异常之后并没有将响应发送给客户机,请求被放到处于等待状态的Continuation队列中,而HTTP连接仍然保持打开状态。
But instead of sending any response to the client as a result of the exception, the request is held in a queue of pending Continuations, and the HTTP connection is kept open.
但是发生该异常之后并没有将响应发送给客户机,请求被放到处于等待状态的Continuation队列中,而HTTP连接仍然保持打开状态。
But instead of sending any response to the client as a result of the exception, the request is held in a queue of pending Continuations, and the HTTP connection is kept open.
应用推荐