com.twitter.common.thrift.monitoring
Class TMonitoredNonblockingServerSocket

java.lang.Object
  extended by org.apache.thrift.transport.TServerTransport
      extended by org.apache.thrift.transport.TNonblockingServerTransport
          extended by org.apache.thrift.transport.TNonblockingServerSocket
              extended by com.twitter.common.thrift.monitoring.TMonitoredNonblockingServerSocket

public class TMonitoredNonblockingServerSocket
extends org.apache.thrift.transport.TNonblockingServerSocket

Extension of TNonblockingServerSocket that allows for tracking of connected clients.


Constructor Summary
TMonitoredNonblockingServerSocket(InetSocketAddress bindAddr, ConnectionMonitor monitor)
           
TMonitoredNonblockingServerSocket(InetSocketAddress bindAddr, int clientTimeout, ConnectionMonitor monitor)
           
TMonitoredNonblockingServerSocket(int port, ConnectionMonitor monitor)
           
TMonitoredNonblockingServerSocket(int port, int clientTimeout, ConnectionMonitor monitor)
           
 
Method Summary
protected  org.apache.thrift.transport.TNonblockingSocket acceptImpl()
           
 void close()
           
 
Methods inherited from class org.apache.thrift.transport.TNonblockingServerSocket
interrupt, listen, registerSelector
 
Methods inherited from class org.apache.thrift.transport.TServerTransport
accept
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TMonitoredNonblockingServerSocket

public TMonitoredNonblockingServerSocket(int port,
                                         ConnectionMonitor monitor)
                                  throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

TMonitoredNonblockingServerSocket

public TMonitoredNonblockingServerSocket(int port,
                                         int clientTimeout,
                                         ConnectionMonitor monitor)
                                  throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

TMonitoredNonblockingServerSocket

public TMonitoredNonblockingServerSocket(InetSocketAddress bindAddr,
                                         ConnectionMonitor monitor)
                                  throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException

TMonitoredNonblockingServerSocket

public TMonitoredNonblockingServerSocket(InetSocketAddress bindAddr,
                                         int clientTimeout,
                                         ConnectionMonitor monitor)
                                  throws org.apache.thrift.transport.TTransportException
Throws:
org.apache.thrift.transport.TTransportException
Method Detail

acceptImpl

protected org.apache.thrift.transport.TNonblockingSocket acceptImpl()
                                                             throws org.apache.thrift.transport.TTransportException
Overrides:
acceptImpl in class org.apache.thrift.transport.TNonblockingServerSocket
Throws:
org.apache.thrift.transport.TTransportException

close

public void close()
Overrides:
close in class org.apache.thrift.transport.TNonblockingServerSocket