public ServiceQueue build ( ) { if ( debug ) logger . debug ( "Building a service" ) ; ServiceQueueSizer serviceQueueSizer = null ; if ( statsConfig != null ) { serviceQueueSizer = new ServiceQueueSizer ( ) ; this . addQueueCallbackHandler ( new ServiceStatsListener ( statsConfig . serviceName , statsConfig . statsCollector , getTimer ( ) , statsConfig . flushTimeSeconds , TimeUnit . SECONDS , statsConfig . sampleEvery , serviceQueueSizer ) ) ; } ServiceQueue serviceQueue = new ServiceQueueImpl ( this . getRootAddress ( ) , this . getServiceAddress ( ) , this . getServiceObject ( ) , this . getRequestQueueBuilder ( ) , this . getResponseQueueBuilder ( ) , this . getServiceMethodHandler ( ) , this . getResponseQueue ( ) , this . isAsyncResponse ( ) , this . isHandleCallbacks ( ) , this . getSystemManager ( ) , this . getBeforeMethodCall ( ) , this . getBeforeMethodCallAfterTransform ( ) , this . getAfterMethodCall ( ) , this . getAfterMethodCallAfterTransform ( ) , buildQueueCallBackHandler ( ) , getCallbackManager ( ) , getBeforeMethodSent ( ) , getEventManager ( ) , isJoinEventManager ( ) ) ; if ( serviceQueueSizer != null ) { serviceQueueSizer . setServiceQueue ( serviceQueue ) ; } if ( qBitSystemManager != null ) { qBitSystemManager . registerService ( serviceQueue ) ; } return serviceQueue ; }
Builds a service .