Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ public void removeTerminalService(TerminalSocket terminalSocket) {
if (terminalSocket2Service.containsKey(terminalSocketHashcode)) {
terminalSocket2Service.remove(terminalSocketHashcode);
} else {
LOGGER.error("Cann't find TerminalSocket: " + terminalSocketHashcode);
LOGGER.error("Can't find TerminalSocket: " + terminalSocketHashcode);
LOGGER.error(terminalSocket2Service.toString());
}
}

public void cleanIntpContext(String nodeId) {
String keyPrex = nodeId + "@";
public void cleanIntpContext(String noteId) {
String keyPrefix = noteId + "@";
for (Map.Entry<String, InterpreterContext> entity : noteParagraphId2IntpContext.entrySet()) {
String key = entity.getKey();
if (key.contains(keyPrex)) {
if (key.contains(keyPrefix)) {
LOGGER.info("cleanIntpContext : " + key);
noteParagraphId2IntpContext.remove(key);
}
Expand Down Expand Up @@ -109,7 +109,7 @@ public void onWebSocketConnect(String noteId, String paragraphId) {
intpContext.getAngularObjectRegistry().add(TERMINAL_SOCKET_STATUS, TERMINAL_SOCKET_CONNECT,
intpContext.getNoteId(), intpContext.getParagraphId());
} else {
LOGGER.error("Cann't find InterpreterContext from : " + id);
LOGGER.error("Can't find InterpreterContext from : " + id);
LOGGER.error(noteParagraphId2IntpContext.toString());
}
}
Expand All @@ -121,7 +121,7 @@ public void onWebSocketClose(TerminalSocket terminalSocket, String noteId, Strin
intpContext.getAngularObjectRegistry().add(TERMINAL_SOCKET_STATUS, TERMINAL_SOCKET_CLOSE,
intpContext.getNoteId(), intpContext.getParagraphId());
} else {
LOGGER.error("Cann't find InterpreterContext from : " + id);
LOGGER.error("Can't find InterpreterContext from : " + id);
LOGGER.error(noteParagraphId2IntpContext.toString());
}

Expand All @@ -136,7 +136,7 @@ public void onWebSocketError(TerminalSocket terminalSocket, String noteId, Strin
intpContext.getAngularObjectRegistry().add(TERMINAL_SOCKET_STATUS, TERMINAL_SOCKET_ERROR,
intpContext.getNoteId(), intpContext.getParagraphId());
} else {
LOGGER.error("Cann't find InterpreterContext from : " + id);
LOGGER.error("Can't find InterpreterContext from : " + id);
LOGGER.error(noteParagraphId2IntpContext.toString());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public class TerminalThread extends Thread {
private Server jettyServer = new Server();

private int port = 0;
private String allwedOrigin;
private String allowedOrigin;

public TerminalThread(int port, String allwedOrigin) {
public TerminalThread(int port, String allowedOrigin) {
this.port = port;
this.allwedOrigin = allwedOrigin;
this.allowedOrigin = allowedOrigin;
}

@Override
Expand Down Expand Up @@ -80,7 +80,7 @@ public void run() {
(servletContext, container) ->
container.addEndpoint(
ServerEndpointConfig.Builder.create(TerminalSocket.class, "/")
.configurator(new TerminalSessionConfigurator(allwedOrigin))
.configurator(new TerminalSessionConfigurator(allowedOrigin))
.build()));
jettyServer.start();
jettyServer.join();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void onWebSocketText(String message) {
terminalService.onTerminalResize(messageMap.get("columns"), messageMap.get("rows"));
break;
default:
LOGGER.error("Unrecodnized action: {}", message);
LOGGER.error("Unrecognized action: {}", message);
}
}
}
Expand Down
Loading