Listener.onNewStream

<p>Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing a HTTP request.</p> <p>Applications should implement this method to process HTTP requests, typically providing a HTTP response via {@link Stream#headers(HeadersFrame, Callback)}.</p> <p>Applications can detect whether request DATA frames will be arriving by testing {@link HeadersFrame#isEndStream()}. If the application is interested in processing the DATA frames, it must return a {@link Stream.Listener} implementation that overrides {@link Stream.Listener#onData(Stream, DataFrame, Callback)}.</p>

@param stream the newly created stream @param frame the HEADERS frame received @return a {@link Stream.Listener} that will be notified of stream events

interface Listener
onNewStream

Meta