public class NettyServerCall extends ServerCall
| Constructor and Description |
|---|
NettyServerCall(Server server,
org.jboss.netty.channel.MessageEvent messageEvent,
org.jboss.netty.buffer.ChannelBuffer contentBuffer,
org.jboss.netty.handler.codec.http.HttpRequest request,
java.net.InetSocketAddress clientAddress,
boolean isConfidential,
javax.net.ssl.SSLEngine sslEngine)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort()
Closes the socket.
|
java.lang.String |
getClientAddress()
Returns the client address.
Corresponds to the IP address of the requesting client. |
int |
getClientPort()
Returns the client port.
Corresponds to the TCP/IP port of the requesting client. |
java.lang.String |
getMethod()
Returns the request method.
|
java.nio.channels.ReadableByteChannel |
getRequestEntityChannel(long size)
Returns the request entity channel if it exists.
|
java.io.InputStream |
getRequestEntityStream(long size)
Returns the request entity stream if it exists.
|
java.nio.channels.ReadableByteChannel |
getRequestHeadChannel()
Returns the request head channel if it exists.
|
Series<Parameter> |
getRequestHeaders()
Returns the modifiable list of request headers.
|
java.io.InputStream |
getRequestHeadStream()
Returns the request head stream if it exists.
|
java.lang.String |
getRequestUri()
Returns the URI on the request line (most like a relative reference, but
not necessarily).
|
org.jboss.netty.handler.codec.http.HttpResponse |
getResponse()
Get response.
|
java.nio.channels.WritableByteChannel |
getResponseEntityChannel()
Returns the response channel if it exists.
|
java.io.OutputStream |
getResponseEntityStream()
Returns the response entity stream if it exists.
|
Response |
getRestletResponse()
Returns the Restlet response.
|
java.lang.String |
getSslCipherSuite()
Returns the SSL Cipher Suite, if available and accessible.
|
java.util.List<java.security.cert.Certificate> |
getSslClientCertificates()
Returns the chain of client certificates, if available and accessible.
|
protected byte[] |
getSslSessionIdBytes()
Returns the SSL session ID, as a byte array, if available and accessible
in that format (to be used by getSslSessionId).
|
java.lang.String |
getVersion()
Returns the protocol version used.
|
protected boolean |
isClientKeepAlive()
Indicates if the client wants a persistent connection.
|
void |
sendResponse(Response response)
Sends the response back to the client.
|
void |
setRestletResponse(Response restletResponse)
Sets the Restlet response.
|
void |
writeResponseHead(Response restletResponse)
Writes the response status line and headers.
|
complete, getContentLength, getHostDomain, getHostPort, getRequestEntity, getSslKeySize, getSslSessionId, isServerKeepAlive, readRequestHead, shouldResponseBeChunked, writeResponseBody, writeResponseHeadgetLogger, getProtocol, getReasonPhrase, getRepresentation, getRepresentation, getResponseHeaders, getServerAddress, getServerPort, getStatusCode, getUserPrincipal, isBroken, isConfidential, isConnectionBroken, isKeepAlive, isRequestChunked, isResponseChunked, setClientAddress, setClientPort, setConfidential, setHostDomain, setHostPort, setMethod, setProtocol, setReasonPhrase, setRequestUri, setServerAddress, setServerPort, setStatusCode, setUserPrincipal, setVersionpublic NettyServerCall(Server server, org.jboss.netty.channel.MessageEvent messageEvent, org.jboss.netty.buffer.ChannelBuffer contentBuffer, org.jboss.netty.handler.codec.http.HttpRequest request, java.net.InetSocketAddress clientAddress, boolean isConfidential, javax.net.ssl.SSLEngine sslEngine)
server - The helped server.messageEvent - The message event received.contentBuffer - The content buffer.request - The Netty request.clientAddress - client information.isConfidential - Indicates if the call is confidential or not.sslEngine - The SSL engine.public boolean abort()
abort in class ServerCallpublic java.lang.String getClientAddress()
CallgetClientAddress in class Callpublic int getClientPort()
CallgetClientPort in class Callpublic java.lang.String getMethod()
Callpublic java.nio.channels.ReadableByteChannel getRequestEntityChannel(long size)
ServerCallgetRequestEntityChannel in class ServerCallsize - The expected entity size or -1 if unknown.public java.io.InputStream getRequestEntityStream(long size)
ServerCallgetRequestEntityStream in class ServerCallsize - The expected entity size or -1 if unknown.public java.nio.channels.ReadableByteChannel getRequestHeadChannel()
ServerCallgetRequestHeadChannel in class ServerCallpublic Series<Parameter> getRequestHeaders()
CallgetRequestHeaders in class Callpublic java.io.InputStream getRequestHeadStream()
ServerCallgetRequestHeadStream in class ServerCallpublic java.lang.String getRequestUri()
CallgetRequestUri in class Callpublic org.jboss.netty.handler.codec.http.HttpResponse getResponse()
public java.nio.channels.WritableByteChannel getResponseEntityChannel()
ServerCallgetResponseEntityChannel in class ServerCallpublic java.io.OutputStream getResponseEntityStream()
ServerCallgetResponseEntityStream in class ServerCallpublic Response getRestletResponse()
public java.lang.String getSslCipherSuite()
ServerCallgetSslCipherSuite in class ServerCallpublic java.util.List<java.security.cert.Certificate> getSslClientCertificates()
ServerCallgetSslClientCertificates in class ServerCallprotected byte[] getSslSessionIdBytes()
ServerCallgetSslSessionIdBytes in class ServerCallpublic java.lang.String getVersion()
CallgetVersion in class Callprotected boolean isClientKeepAlive()
CallisClientKeepAlive in class ServerCallpublic void sendResponse(Response response) throws java.io.IOException
ServerCallsendResponse in class ServerCallresponse - The high-level response.java.io.IOException - if the Response could not be written to the network.public void setRestletResponse(Response restletResponse)
restletResponse - The Restlet response.public void writeResponseHead(Response restletResponse) throws java.io.IOException
ServerCallwriteResponseHead in class ServerCallrestletResponse - The response.java.io.IOExceptionCopyright © 2005-2012. All Rights Reserved.