本文整理了Java中org.glassfish.grizzly.http.server.Request.getNIOReader
方法的一些代码示例,展示了Request.getNIOReader
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getNIOReader
方法的具体详情如下:
包路径:org.glassfish.grizzly.http.server.Request
类名称:Request
方法名:getNIOReader
[英]Returns the NIOReader associated with this Request. This NIOReader will not block while reading content.
[中]返回与此请求关联的NIOReader。该阅读器在阅读内容时不会阻塞。
代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: javaee/grizzly
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: javaee/grizzly
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: javaee/grizzly
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: javaee/grizzly
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: javaee/grizzly
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: javaee/grizzly
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: javaee/grizzly
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core
/**
* <p>
* Returns the {@link Reader} associated with this {@link Request}.
* </p>
*
* By default the returned {@link NIOReader} will work as blocking
* {@link java.io.Reader}, but it will be possible to call {@link NIOReader#isReady()}
* or {@link NIOReader#notifyAvailable(org.glassfish.grizzly.ReadHandler)}
* to avoid blocking.
*
* @return the {@link NIOReader} associated with this {@link Request}.
*
* @throws IllegalStateException if {@link #getInputStream()} or
* {@link #getNIOInputStream()} has already been called for this request.
*
* @since 2.2
*/
public Reader getReader() {
return getNIOReader();
}
代码示例来源:origin: ch.squaredesk.nova/http
public void service(Request request, Response response) throws Exception {
response.suspend();
NIOReader in = request.getNIOReader();
in.notifyAvailable(new ReadHandler() {
private char[] inputBuffer = new char[0];
代码示例来源:origin: javaee/grizzly
final NIOReader in = request.getNIOReader(); // return the non-blocking InputStream
final NIOWriter out = response.getNIOWriter();
内容来源于网络,如有侵权,请联系作者删除!