Package org.apache.zookeeper.server
Class NettyServerCnxn
- java.lang.Object
-
- org.apache.zookeeper.server.ServerCnxn
-
- org.apache.zookeeper.server.NettyServerCnxn
-
- All Implemented Interfaces:
Watcher
public class NettyServerCnxn extends ServerCnxn
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.zookeeper.server.ServerCnxn
ServerCnxn.CloseRequestException, ServerCnxn.EndOfStreamException
-
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
Watcher.Event, Watcher.WatcherType
-
-
Field Summary
-
Fields inherited from class org.apache.zookeeper.server.ServerCnxn
authInfo, count, established, lastCxid, lastLatency, lastOp, lastResponseTime, lastZxid, maxLatency, me, minLatency, packetsReceived, packetsSent, totalLatency, zooKeeperSaslServer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
disableRecv()
Note that both disableRecv() and disableRecvNoWait() are asynchronous in the netty implementation.void
enableRecv()
java.security.cert.Certificate[]
getClientCertificateChain()
int
getInterestOps()
long
getOutstandingRequests()
java.net.InetSocketAddress
getRemoteSocketAddress()
long
getSessionId()
int
getSessionTimeout()
boolean
isSecure()
void
process(WatchedEvent event)
void
sendBuffer(java.nio.ByteBuffer sendBuffer)
void
sendCloseSession()
Send close connection packet to the client.void
sendResponse(org.apache.zookeeper.proto.ReplyHeader h, org.apache.jute.Record r, java.lang.String tag)
protected ServerStats
serverStats()
void
setClientCertificateChain(java.security.cert.Certificate[] chain)
void
setSessionId(long sessionId)
void
setSessionTimeout(int sessionTimeout)
-
Methods inherited from class org.apache.zookeeper.server.ServerCnxn
addAuthInfo, cleanupWriterSocket, dumpConnectionInfo, getAuthInfo, getAvgLatency, getConnectionInfo, getEstablished, getLastCxid, getLastLatency, getLastOperation, getLastResponseTime, getLastZxid, getMaxLatency, getMinLatency, getPacketsReceived, getPacketsSent, incrOutstandingRequests, incrPacketsReceived, incrPacketsSent, packetReceived, packetSent, removeAuthInfo, resetStats, toString, updateStatsForResponse
-
-
-
-
Method Detail
-
close
public void close()
-
getSessionId
public long getSessionId()
- Specified by:
getSessionId
in classServerCnxn
-
getSessionTimeout
public int getSessionTimeout()
-
process
public void process(WatchedEvent event)
- Specified by:
process
in interfaceWatcher
- Specified by:
process
in classServerCnxn
-
sendResponse
public void sendResponse(org.apache.zookeeper.proto.ReplyHeader h, org.apache.jute.Record r, java.lang.String tag) throws java.io.IOException
- Overrides:
sendResponse
in classServerCnxn
- Throws:
java.io.IOException
-
setSessionId
public void setSessionId(long sessionId)
-
sendBuffer
public void sendBuffer(java.nio.ByteBuffer sendBuffer)
-
disableRecv
public void disableRecv()
Note that both disableRecv() and disableRecvNoWait() are asynchronous in the netty implementation.
-
enableRecv
public void enableRecv()
-
getOutstandingRequests
public long getOutstandingRequests()
- Specified by:
getOutstandingRequests
in classServerCnxn
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout)
-
getInterestOps
public int getInterestOps()
- Specified by:
getInterestOps
in classServerCnxn
-
getRemoteSocketAddress
public java.net.InetSocketAddress getRemoteSocketAddress()
- Specified by:
getRemoteSocketAddress
in classServerCnxn
-
sendCloseSession
public void sendCloseSession()
Send close connection packet to the client.
-
serverStats
protected ServerStats serverStats()
- Specified by:
serverStats
in classServerCnxn
-
isSecure
public boolean isSecure()
- Specified by:
isSecure
in classServerCnxn
-
getClientCertificateChain
public java.security.cert.Certificate[] getClientCertificateChain()
- Specified by:
getClientCertificateChain
in classServerCnxn
-
setClientCertificateChain
public void setClientCertificateChain(java.security.cert.Certificate[] chain)
- Specified by:
setClientCertificateChain
in classServerCnxn
-
-