(Config config)
| 106 | } |
| 107 | |
| 108 | @Override |
| 109 | protected Handlers createHandlers(Config config) { |
| 110 | LoggingOptions loggingOptions = new LoggingOptions(config); |
| 111 | Tracer tracer = loggingOptions.getTracer(); |
| 112 | |
| 113 | EventBusOptions events = new EventBusOptions(config); |
| 114 | EventBus bus = events.getEventBus(); |
| 115 | |
| 116 | CombinedHandler handler = new CombinedHandler(); |
| 117 | |
| 118 | LocalSessionMap sessions = new LocalSessionMap(tracer, bus); |
| 119 | handler.addHandler(sessions); |
| 120 | |
| 121 | BaseServerOptions serverOptions = new BaseServerOptions(config); |
| 122 | SecretOptions secretOptions = new SecretOptions(config); |
| 123 | Secret secret = secretOptions.getRegistrationSecret(); |
| 124 | |
| 125 | URL externalUrl; |
| 126 | try { |
| 127 | externalUrl = serverOptions.getExternalUri().toURL(); |
| 128 | } catch (MalformedURLException e) { |
| 129 | throw new IllegalArgumentException(e); |
| 130 | } |
| 131 | |
| 132 | NetworkOptions networkOptions = new NetworkOptions(config); |
| 133 | HttpClient.Factory clientFactory = |
| 134 | new RoutableHttpClientFactory( |
| 135 | externalUrl, handler, networkOptions.getHttpClientFactory(tracer)); |
| 136 | |
| 137 | DistributorOptions distributorOptions = new DistributorOptions(config); |
| 138 | NewSessionQueueOptions newSessionRequestOptions = new NewSessionQueueOptions(config); |
| 139 | LocalNewSessionQueue queue = |
| 140 | new LocalNewSessionQueue( |
| 141 | tracer, |
| 142 | distributorOptions.getSlotMatcher(), |
| 143 | newSessionRequestOptions.getSessionRequestTimeoutPeriod(), |
| 144 | newSessionRequestOptions.getSessionRequestTimeout(), |
| 145 | newSessionRequestOptions.getMaximumResponseDelay(), |
| 146 | secret, |
| 147 | newSessionRequestOptions.getBatchSize()); |
| 148 | handler.addHandler(queue); |
| 149 | |
| 150 | LocalDistributor distributor = |
| 151 | new LocalDistributor( |
| 152 | tracer, |
| 153 | bus, |
| 154 | clientFactory, |
| 155 | sessions, |
| 156 | queue, |
| 157 | distributorOptions.getSlotSelector(), |
| 158 | secret, |
| 159 | distributorOptions.getHealthCheckInterval(), |
| 160 | distributorOptions.shouldRejectUnsupportedCaps(), |
| 161 | newSessionRequestOptions.getSessionRequestRetryInterval(), |
| 162 | distributorOptions.getNewSessionThreadPoolSize(), |
| 163 | distributorOptions.getSlotMatcher(), |
| 164 | distributorOptions.getPurgeNodesInterval()); |
| 165 | handler.addHandler(distributor); |
nothing calls this directly
no test coverage detected