private ServerSocket initializeServer ( CoronaConf conf ) throws IOException { // Choose any free port. ServerSocket sessionServerSocket = new ServerSocket ( 0 , 0 , getLocalAddress ( ) ) ; TServerSocket tServerSocket = new TServerSocket ( sessionServerSocket , conf . getCMSoTimeout ( ) ) ; TFactoryBasedThreadPoolServer . Args args = new TFactoryBasedThreadPoolServer . Args ( tServerSocket ) ; args . processor ( new SessionDriverServiceProcessor ( incoming ) ) ; args . transportFactory ( new TTransportFactory ( ) ) ; args . protocolFactory ( new TBinaryProtocol . Factory ( true , true ) ) ; args . stopTimeoutVal = 0 ; server = new TFactoryBasedThreadPoolServer ( args , new TFactoryBasedThreadPoolServer . DaemonThreadFactory ( ) ) ; return sessionServerSocket ; }
Start the SessionDriver callback server