@Nullable public Message<?> receive(long timeout) { ChannelInterceptorList interceptorList = getInterceptors(); Deque<ChannelInterceptor> interceptorStack = null; boolean counted = false;
/** * Receive the first available message from this channel. If the channel * contains no messages, this method will block until the allotted timeout * elapses. If the specified timeout is 0, the method will return * immediately. If less than zero, it will block indefinitely (see * {@link #receive()}). * * @param timeout the timeout in milliseconds * * @return the first available message or <code>null</code> if no message * is available within the allotted time or the receiving thread is * interrupted. */ public final Message<?> receive(long timeout) { if (!this.getInterceptors().preReceive(this)) { return null; } Message<?> message = this.doReceive(timeout); message = this.getInterceptors().postReceive(message, this); return message; }
@Nullable public Message<?> receive(long timeout) { ChannelInterceptorList interceptorList = getInterceptors(); Deque<ChannelInterceptor> interceptorStack = null; boolean counted = false;