public void startOpera() throws OperaRunnerException {
    assertLauncherAlive();

    try {
      byte[] request = LauncherStartRequest.newBuilder().build().toByteArray();

      ResponseEncapsulation res = protocol.sendRequest(MessageType.MSG_START, request);

      if (handleStatusMessage(res.getResponse()) != StatusType.RUNNING) {
        throw new IOException("launcher unable to start binary");
      }

      // Check Opera hasn't immediately exited (e.g. due to unknown arguments)
      sleep(OperaIntervals.PROCESS_START_SLEEP);

      res = protocol.sendRequest(MessageType.MSG_STATUS, request);

      if (handleStatusMessage(res.getResponse()) != StatusType.RUNNING) {
        throw new IOException(
            "Opera exited immediately; possibly incorrect arguments?  Command: " +
            binary.getCommands());
      }
    } catch (IOException e) {
      throw new OperaRunnerException("Could not start Opera: " + e.getMessage());
    }
  }
public void startOpera ( ) throws OperaRunnerException { assertLauncherAlive ( ) ; try { byte [ ] request = LauncherStartRequest . newBuilder ( ) . build ( ) . toByteArray ( ) ; ResponseEncapsulation res = protocol . sendRequest ( MessageType . MSG_START , request ) ; if ( handleStatusMessage ( res . getResponse ( ) ) != StatusType . RUNNING ) { throw new IOException ( "launcher unable to start binary" ) ; } sleep ( OperaIntervals . PROCESS_START_SLEEP ) ; res = protocol . sendRequest ( MessageType . MSG_STATUS , request ) ; if ( handleStatusMessage ( res . getResponse ( ) ) != StatusType . RUNNING ) { throw new IOException ( "Opera exited immediately; possibly incorrect arguments?  Command: " + binary . getCommands ( ) ) ; } } catch ( IOException e ) { throw new OperaRunnerException ( "Could not start Opera: " + e . getMessage ( ) ) ; } }
{@inheritDoc}

@throws OperaRunnerException if launcher is shut down or not running