Interactor Use case
321792
@Override
    public void run() {
        super.subjectRepository.deleteSubject(subject, new SubjectRepository.SubjectUseCase() {
            @Override
            public void onMissionAccomplished(final Subject subject) {
                DeleteSubjectUseCaseImp.super.mainThread.post(new Runnable() {
                    @Override
                    public void run() {
                        callback.onMissionAccomplished(subject);
                    }
                });
            }

            @Override
            public void onError(final SubjectException subjectException) {
                DeleteSubjectUseCaseImp.super.mainThread.post(new Runnable() {
                    @Override
                    public void run() {
                        callback.onError(subjectException);
                    }
                });
            }
        });
    }
56212
def interact(self):
        """"""
        lines = ""
        for line in self.read():
            lines += line
            try:
                self.eval(lines)
            except ValueError:
                pass
            except KeyboardInterrupt as e:
                raise e
            except:
                self.terminal.error(traceback.format_exc())
                break
            else:
                break
406918
function UI (input, output) {
  this.rl = readline.createInterface({
    input: input || ttys.stdin,
    output: output || ttys.stdout
  })
  
  // Delegated events bind.
  this.onLine = (function onLine () {
    _events.line.apply(this, arguments)
  }).bind(this)
  
  this.onKeypress = (function onKeypress () {
    if (this.rl) {
      _events.keypress.apply(this, arguments)
    }
  }).bind(this)
  
  this.forceClose = this.forceClose.bind(this)
  
  this.rl.addListener('line', this.onLine)
  this.rl.input.addListener('keypress', this.onKeypress)
  
  this.rl.on('SIGINT', this.forceClose)
  process.on('exit', this.forceClose)
}
365564
def run!(**options)
      interaction = run(options)
      raise error_class.new(interaction.error) unless interaction.success?
      interaction.result
    end
997249
function populateInterfacesList(intfs) {
    e_interfaceList.innerHTML = ""

    fixedIntfs = []
    intfs.forEach(function(intf){
        fixedIntfs.push(intf.name)
        Interfaces[intf.name] = intf

        if (!intf.methods)    intf.methods    = []
        if (!intf.attributes) intf.attributes = []
    })

    intfs = fixedIntfs

    intfs.sort()
    intfs.forEach(function(intf){
        var a  = document.createElement("a")
        a.href          = "#"
        a.innerHTML     = intf
        a.interfaceName = intf
        a.addEventListener("click", el_interfaceClicked, false)

        var li = document.createElement("li")
        li.appendChild(a)
        e_interfaceList.appendChild(li)
    })
}
975497
function(sType, oSrcElement) {
			var iTime = now();

			if (oPendingInteraction) {
				finalizeInteraction(iTime);
			}

			// clear request timings for new interaction
			if (window.performance.clearResourceTimings) {
				window.performance.clearResourceTimings();
			}

			var oComponentInfo = createOwnerComponentInfo(oSrcElement);

			// setup new pending interaction
			oPendingInteraction = createMeasurement(iTime);
			oPendingInteraction.event = sType;
			oPendingInteraction.component = oComponentInfo.id;
			oPendingInteraction.appVersion = oComponentInfo.version;
			oPendingInteraction.start = iTime;
			if (oSrcElement && oSrcElement.getId) {
				oPendingInteraction.trigger = oSrcElement.getId();
			}
			Log.info("Interaction step started: trigger: " + oPendingInteraction.trigger + "; type: " + oPendingInteraction.event, "Interaction.js");
		}
714122
function showBusyIndicator(updateCursor) {
        if (!_init) {
            console.error("StatusBar API invoked before status bar created");
            return;
        }

        if (updateCursor) {
            _busyCursor = true;
            $("*").addClass("busyCursor");
        }

        $busyIndicator.addClass("spin");
    }
799188
def interactive(self):
        """"""
        while True:
            line = sys.stdin.readline().strip()
            if line == 'quit':
                sys.exit()
            elif line == 'validate':
                self.check_syntax()
                self.check_imports()
                self.check_install_json()
                self.check_layout_json()
                self.print_json()

            # reset validation_data
            self.validation_data = self._validation_data
1295611
function(interaction) {
        const action = ngeoQueryKeyboard.action;
        const extent = interaction.getGeometry().getExtent();
        const limit = scope.$eval(attrs['ngeoBboxQueryLimit']);
        ngeoMapQuerent.issue({
          action,
          extent,
          limit,
          map
        });
      }
1320695
public static void interactWithTheUser() throws Exception
    {
        final SQLConsoleReader interactiveReader =
                new SQLConsoleReader(new FileInputStream(FileDescriptor.in), System.out);
        interactiveReader.setBellEnabled(false);
        FileHistory historyFile = null;
        try {
            // Maintain persistent history in ~/.sqlcmd_history.
            historyFile = new FileHistory(new File(System.getProperty("user.home"), ".sqlcmd_history"));
            interactiveReader.setHistory(historyFile);

            // Make Ctrl-D (EOF) exit if on an empty line, otherwise delete the next character.
            KeyMap keyMap = interactiveReader.getKeys();
            keyMap.bind(new Character(KeyMap.CTRL_D).toString(), new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    CursorBuffer cursorBuffer = interactiveReader.getCursorBuffer();
                    if (cursorBuffer.length() == 0) {
                        // tells caller to stop (basically a goto)
                        throw new SQLCmdEarlyExitException();
                    } else {
                        try {
                            interactiveReader.delete();
                        } catch (IOException e1) {
                        }
                    }
                }
            });

            getInteractiveQueries(interactiveReader);
        }
        finally {
            // Flush input history to a file.
            if (historyFile != null) {
                try {
                    historyFile.flush();
                }
                catch (IOException e) {
                    System.err.printf("* Unable to write history to \"%s\" *\n",
                                      historyFile.getFile().getPath());
                    if (m_debug) {
                        e.printStackTrace();
                    }
                }
            }
            // Clean up jline2 resources.
            if (interactiveReader != null) {
                interactiveReader.shutdown();
            }
        }
    }
603270
function callEnterHandlers(context) {
    var i, n;
    for (i = 0, n = this.enters.length; i < n; i++) {
      this.enters[i].call(this, context);
    }
  }
379605
def interactive():
    
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('--device', default='/dev/ttyUSB0',
                        help='Path to PLM device')
    parser.add_argument('-v', '--verbose', action='count',
                        help='Set logging level to verbose')
    parser.add_argument('-l', '--logfile', default='',
                        help='Log file name')
    parser.add_argument('--workdir', default='',
                        help='Working directory for reading and saving '
                        'device information.')
    args = parser.parse_args()

    loop = asyncio.get_event_loop()
    cmd = Commander(loop, args)
    cmd.start()
    try:
        loop.run_forever()
    except KeyboardInterrupt:
        if cmd.tools.plm:
            if cmd.tools.plm.transport:
                # _LOGGING.info('Closing the session')
                cmd.tools.plm.transport.close()
        loop.stop()
        pending = asyncio.Task.all_tasks(loop=loop)
        for task in pending:
            task.cancel()
            try:
                loop.run_until_complete(task)
            except asyncio.CancelledError:
                pass
            except KeyboardInterrupt:
                pass
        loop.close()
1037591
def interactive(renderer):
    
    _import_readline()
    _print_heading(renderer)
    contents = []
    more = False
    while True:
        try:
            prompt, more = ('... ', True) if more else ('>>> ', True)
            contents.append(input(prompt) + '\n')
        except EOFError:
            print('\n' + mistletoe.markdown(contents, renderer), end='')
            more = False
            contents = []
        except KeyboardInterrupt:
            print('\nExiting.')
            break
1173420
def do_interact(self, arg):
        
        ns = self.curframe.f_globals.copy()
        ns.update(self.curframe_locals)
        code.interact("*interactive*", local=ns)
360828
def main(url):
    """"""
    try:
        listener = ListenerWorker(url)
        listener.connect()
        listener.run_forever()
    except KeyboardInterrupt:
        listener.close()
250060
def interact(self,
	            msg='SHUTIT PAUSE POINT',
	            shutit_pexpect_child=None,
	            print_input=True,
	            level=1,
	            resize=True,
	            color='32',
	            default_msg=None,
	            wait=-1):
		""""""
		shutit_global.shutit_global_object.yield_to_draw()
		self.pause_point(msg=msg,
		                 shutit_pexpect_child=shutit_pexpect_child,
		                 print_input=print_input,
		                 level=level,
		                 resize=resize,
		                 color=color,
		                 default_msg=default_msg,
		                 interact=True,
		                 wait=wait)
516263
public synchronized Interactable getInteractableAt(TerminalPosition position) {
        if (position.getRow() < 0 || position.getColumn() < 0) {
            return null;
        }
        if(position.getRow() >= lookupMap.length) {
            return null;
        }
        else if(position.getColumn() >= lookupMap[0].length) {
            return null;
        }
        else if(lookupMap[position.getRow()][position.getColumn()] == -1) {
            return null;
        }
        return interactables.get(lookupMap[position.getRow()][position.getColumn()]);
    }