public void enableRemoteShell(KernelData kernel, Map<String, Serializable> config) { ShellBootstrap bootstrap = new ShellBootstrap(config); GraphDatabaseShellServer server = getState(kernel); try { if (server != null) { bootstrap.enable(server); } else { loadAgent(kernel, bootstrap); } } catch (RemoteException cause) { throw new RuntimeException("Could not load remote shell", cause); } }
private GraphDatabaseShellServer loadShell(KernelData kernel, ShellBootstrap bootstrap) { try { return bootstrap.load(kernel.graphDatabase()); } catch (RemoteException cause) { throw new RuntimeException("Could not load remote shell", cause); } }
@Override protected void agentVisit(KernelData kernel, GraphDatabaseShellServer state, Object param) { ((ShellBootstrap) param).visit(state); }
@Override protected ShellBootstrap agentArgument(String agentArg) { return ShellBootstrap.deserialize(agentArg); }