org.apache.zookeeper.server
Class NettyServerCnxn

java.lang.Object
  extended by org.apache.zookeeper.server.ServerCnxn
      extended by 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
 
Field Summary
 
Fields inherited from class org.apache.zookeeper.server.ServerCnxn
authInfo, cmd2String, confCmd, consCmd, count, crstCmd, dumpCmd, enviCmd, established, getTraceMaskCmd, isroCmd, lastCxid, lastLatency, lastOp, lastResponseTime, lastZxid, maxLatency, me, minLatency, mntrCmd, packetsReceived, packetsSent, ruokCmd, setTraceMaskCmd, srstCmd, srvrCmd, statCmd, totalLatency, wchcCmd, wchpCmd, wchsCmd, zooKeeperSaslServer
 
Method Summary
 void close()
           
 void disableRecv()
           
 void enableRecv()
           
 int getInterestOps()
           
 long getOutstandingRequests()
          The number of requests that have been submitted but not yet responded to.
 InetSocketAddress getRemoteSocketAddress()
           
 long getSessionId()
           
 int getSessionTimeout()
           
 void process(WatchedEvent event)
           
 void receiveMessage(org.jboss.netty.buffer.ChannelBuffer message)
           
 void sendBuffer(ByteBuffer sendBuffer)
           
 void sendCloseSession()
          Send close connection packet to the client.
 void sendResponse(ReplyHeader h, org.apache.jute.Record r, String tag)
           
protected  ServerStats serverStats()
           
 void setSessionId(long sessionId)
           
 void setSessionTimeout(int sessionTimeout)
           
 
Methods inherited from class org.apache.zookeeper.server.ServerCnxn
addAuthInfo, dumpConnectionInfo, getAuthInfo, getAvgLatency, getEstablished, getLastCxid, getLastLatency, getLastOperation, getLastResponseTime, getLastZxid, getMaxLatency, getMinLatency, getPacketsReceived, getPacketsSent, incrOutstandingRequests, incrPacketsReceived, incrPacketsSent, packetReceived, packetSent, removeAuthInfo, resetStats, toString, updateStatsForResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

close

public void close()

getSessionId

public long getSessionId()

getSessionTimeout

public int getSessionTimeout()

process

public void process(WatchedEvent event)
Specified by:
process in interface Watcher
Specified by:
process in class ServerCnxn

sendResponse

public void sendResponse(ReplyHeader h,
                         org.apache.jute.Record r,
                         String tag)
                  throws IOException
Specified by:
sendResponse in class ServerCnxn
Throws:
IOException

setSessionId

public void setSessionId(long sessionId)

enableRecv

public void enableRecv()

sendBuffer

public void sendBuffer(ByteBuffer sendBuffer)

receiveMessage

public void receiveMessage(org.jboss.netty.buffer.ChannelBuffer message)

disableRecv

public void disableRecv()

getOutstandingRequests

public long getOutstandingRequests()
The number of requests that have been submitted but not yet responded to.

Specified by:
getOutstandingRequests in class ServerCnxn

setSessionTimeout

public void setSessionTimeout(int sessionTimeout)

getInterestOps

public int getInterestOps()
Specified by:
getInterestOps in class ServerCnxn

getRemoteSocketAddress

public InetSocketAddress getRemoteSocketAddress()
Specified by:
getRemoteSocketAddress in class ServerCnxn

sendCloseSession

public void sendCloseSession()
Send close connection packet to the client.


serverStats

protected ServerStats serverStats()
Specified by:
serverStats in class ServerCnxn


Copyright © 2011 The Apache Software Foundation