11package restx .server ;
22
3- import com .google .common .base .Preconditions ;
43import com .google .common .base .Strings ;
5- import com .google .common .eventbus .EventBus ;
64import org .eclipse .jetty .security .DefaultIdentityService ;
75import org .eclipse .jetty .security .HashLoginService ;
86import org .eclipse .jetty .server .Handler ;
1715import org .eclipse .jetty .webapp .WebAppContext ;
1816import org .slf4j .Logger ;
1917import org .slf4j .LoggerFactory ;
20- import restx .common .MoreFiles ;
2118import restx .common .Version ;
2219
23- import java .io .File ;
2420import java .util .concurrent .atomic .AtomicLong ;
2521
2622import static com .google .common .base .Preconditions .checkNotNull ;
@@ -136,21 +132,21 @@ public synchronized boolean isStarted() {
136132 return server != null ;
137133 }
138134
139- private ThreadPool createThreadPool () {
135+ protected ThreadPool createThreadPool () {
140136 QueuedThreadPool threadPool = new QueuedThreadPool ();
141137 threadPool .setMinThreads (1 );
142138 threadPool .setMaxThreads (Math .max (10 , Runtime .getRuntime ().availableProcessors ()));
143139 return threadPool ;
144140 }
145141
146- private SelectChannelConnector createConnector () {
142+ protected SelectChannelConnector createConnector () {
147143 SelectChannelConnector connector = new SelectChannelConnector ();
148144 connector .setPort (port );
149145 connector .setHost (bindInterface );
150146 return connector ;
151147 }
152148
153- private HandlerCollection createHandlers (WebAppContext webAppContext ) {
149+ protected HandlerCollection createHandlers (WebAppContext webAppContext ) {
154150
155151 HandlerList contexts = new HandlerList ();
156152 contexts .setHandlers (new Handler []{webAppContext });
@@ -161,7 +157,7 @@ private HandlerCollection createHandlers(WebAppContext webAppContext) {
161157 return result ;
162158 }
163159
164- private WebAppContext createContext () {
160+ protected WebAppContext createContext () {
165161 final WebAppContext ctx = new WebAppContext ();
166162 ctx .setContextPath ("/" );
167163 ctx .setWar (appBase );
0 commit comments