| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library socket.server; | 5 library socket.server; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/analysis_server.dart'; | 7 import 'package:analysis_server/src/analysis_server.dart'; |
| 8 import 'package:analysis_server/src/channel.dart'; | 8 import 'package:analysis_server/src/channel.dart'; |
| 9 import 'package:analysis_server/src/domain_analysis.dart'; | 9 import 'package:analysis_server/src/domain_analysis.dart'; |
| 10 import 'package:analysis_server/src/domain_context.dart'; | |
| 11 import 'package:analysis_server/src/domain_server.dart'; | 10 import 'package:analysis_server/src/domain_server.dart'; |
| 12 import 'package:analysis_server/src/protocol.dart'; | 11 import 'package:analysis_server/src/protocol.dart'; |
| 13 import 'package:analysis_server/src/resource.dart'; | 12 import 'package:analysis_server/src/resource.dart'; |
| 14 | 13 |
| 15 /** | 14 /** |
| 16 * Instances of the class [SocketServer] implement the common parts of | 15 * Instances of the class [SocketServer] implement the common parts of |
| 17 * http-based and stdio-based analysis servers. The primary responsibility of | 16 * http-based and stdio-based analysis servers. The primary responsibility of |
| 18 * the SocketServer is to manage the lifetime of the AnalysisServer and to | 17 * the SocketServer is to manage the lifetime of the AnalysisServer and to |
| 19 * encode and decode the JSON messages exchanged with the client. | 18 * encode and decode the JSON messages exchanged with the client. |
| 20 */ | 19 */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 44 _initializeHandlers(analysisServer); | 43 _initializeHandlers(analysisServer); |
| 45 } | 44 } |
| 46 | 45 |
| 47 /** | 46 /** |
| 48 * Initialize the handlers to be used by the given [server]. | 47 * Initialize the handlers to be used by the given [server]. |
| 49 */ | 48 */ |
| 50 void _initializeHandlers(AnalysisServer server) { | 49 void _initializeHandlers(AnalysisServer server) { |
| 51 server.handlers = [ | 50 server.handlers = [ |
| 52 new ServerDomainHandler(server), | 51 new ServerDomainHandler(server), |
| 53 new AnalysisDomainHandler(server), | 52 new AnalysisDomainHandler(server), |
| 54 new ContextDomainHandler(server), | |
| 55 ]; | 53 ]; |
| 56 } | 54 } |
| 57 | 55 |
| 58 } | 56 } |
| OLD | NEW |