File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
extensions/devui/runtime/src/main/java/io/quarkus/devui/runtime/mcp Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 14
14
import jakarta .enterprise .context .ApplicationScoped ;
15
15
import jakarta .enterprise .inject .Produces ;
16
16
17
+ import org .jboss .logging .Logger ;
18
+
17
19
import io .quarkus .devui .runtime .spi .McpEvent ;
18
20
import io .quarkus .devui .runtime .spi .McpServerConfiguration ;
19
21
import io .smallrye .mutiny .Multi ;
24
26
*/
25
27
@ ApplicationScoped
26
28
public class McpDevUIJsonRpcService {
29
+ private static final Logger LOG = Logger .getLogger (McpDevUIJsonRpcService .class .getName ());
30
+
27
31
private final BroadcastProcessor <McpClientInfo > connectedClientStream = BroadcastProcessor .create ();
28
32
private final BroadcastProcessor <McpEvent > mcpEventStream = BroadcastProcessor .create ();
29
33
@@ -112,11 +116,17 @@ private Properties loadConfiguration() {
112
116
}
113
117
114
118
private boolean storeConfiguration (Properties p ) {
115
- try (OutputStream out = Files .newOutputStream (configFile )) {
116
- p .store (out , "Dev MCP Configuration" );
117
- return true ;
119
+ try {
120
+ Files .createDirectories (configDir );
121
+ try (OutputStream out = Files .newOutputStream (configFile )) {
122
+ p .store (out , "Dev MCP Configuration" );
123
+ return true ;
124
+ } catch (IOException ex ) {
125
+ LOG .error ("Could not create config file for Dev MCP [" + configFile + "]" , ex );
126
+ return false ;
127
+ }
118
128
} catch (IOException ex ) {
119
- ex . printStackTrace ( );
129
+ LOG . error ( "Could not create config directory for Dev MCP [" + configDir + "]" , ex );
120
130
return false ;
121
131
}
122
132
}
You can’t perform that action at this time.
0 commit comments