Starts a Process to start sending outstanding error reports.

@param onlySendSilentReports If true then only send silent reports.
425423
private void sendReport(@NonNull File report, boolean onlySendSilentReports) {
        if (enabled) {
            schedulerStarter.scheduleReports(report, onlySendSilentReports);
        } else {
            ACRA.log.w(LOG_TAG, "Would be sending reports, but ACRA is disabled");
        }
    }
794454
public synchronized void startReporting(final String reporterName, final Props props) {
    final String metricsReporterClassName = props.get(CUSTOM_METRICS_REPORTER_CLASS_NAME);
    final String metricsServerURL = props.get(METRICS_SERVER_URL);
    if (metricsReporterClassName != null && metricsServerURL != null) {
      try {
        log.info("metricsReporterClassName: " + metricsReporterClassName);
        final Class metricsClass = Class.forName(metricsReporterClassName);

        final Constructor[] constructors = metricsClass.getConstructors();
        constructors[0].newInstance(reporterName, this.registry, metricsServerURL);

      } catch (final Exception e) {
        log.error("Encountered error while loading and instantiating "
            + metricsReporterClassName, e);
        throw new IllegalStateException("Encountered error while loading and instantiating "
            + metricsReporterClassName, e);
      }
    } else {
      log.error(String.format("No value for property: %s or %s was found",
          CUSTOM_METRICS_REPORTER_CLASS_NAME, METRICS_SERVER_URL));
    }
  }
59649
private void runSession() {
		if (!started) {
			logString("Thread Starting");
			completed = false;
			seqNum = getStartSeqNum();
			rtpStack.setNextZrtpSequenceNumber(getStartSeqNum());
			state = ZRTP_STATE_INACTIVE;
			initiator = false;
			hashMode = HashType.UNDEFINED;
			dhMode = KeyAgreementType.DH3K;
			sasMode = SasType.UNDEFINED;
			farEndZID = null;
			farEndH0 = null;
			farEndClientID = "";
			isLegacyClient = false;
			// farEndH1 = null;
			// farEndH2 = null;
			// farEndH3 = null;
			farEndZID = null;
			dhPart1Msg = null;
			dhPart2Msg = null;
			rxHelloMsg = txHelloMsg = commitMsg = null;
			msgConfirm1TX = msgConfirm2TX = null;
			msgConfirm1RX = msgConfirm2RX = null;
			msgErrorTX = null;

			try {
				// TODO: create after algorithm negotiation
				dhSuite.setAlgorithm(KeyAgreementType.DH3K);
				// Initialize the retransmission timer interval
				timerInterval = T1_INITIAL_INTERVAL;
				sendHello();
				started = true;
			} catch (Throwable e) {
				logError("Exception sending initial Hello message: "
						+ e.toString());
				e.printStackTrace();
				completed = true;
			}
			while (!completed) {
				synchronized (lock) {
					try {
						lock.wait();
					} catch (Throwable e) {
						logString("Thread Interrupted E:" + e);
					}
				}
				processQueuedMessages();
			}
			endSession();
			logString("Thread Ending");
		}
	}
395645
public void sendStart() throws SIConnectionDroppedException, SIConnectionLostException {                     //471642
     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "start");
     sendStart(false);            // Always use proper start
     if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
   }
1098132
protected void start(FailureHandler failureHandler) throws Exception {
		do {
			Throwable error = doStart();
			if (error == null) {
				return;
			}
			if (failureHandler.handle(error) == Outcome.ABORT) {
				return;
			}
		}
		while (true);
	}
152843
public void notifyStart(String projectApiId, String projectVersion, String category) {
		try {
			if (isStarted()) {
				JSONObject startNotification = new JSONObject().
					put("project", new JSONObject().
						put("apiId", projectApiId).
						put("version", projectVersion)
					).
					put("category", category);
				
				socket.emit("run:start", startNotification);
			}
			else {
				LOGGER.log(Level.WARNING, "Probe Dock RT is not available to send the start notification");
			}
		}
		catch (Exception e) {
			LOGGER.log(Level.INFO, "Unable to send the start notification to the agent. Cause: " + e.getMessage());
			
			if (LOGGER.getLevel() == Level.FINEST) {
				LOGGER.log(Level.FINEST, "Exception: ", e);
			}
		}
	}
105251
@Override
  public synchronized void start() {
    if (isStarted()) {
      return;
    }
    MonitoredResource resource = getMonitoredResource(getProjectId());
    defaultWriteOptions =
        new WriteOption[] {WriteOption.logName(getLogName()), WriteOption.resource(resource)};
    getLogging().setFlushSeverity(severityFor(getFlushLevel()));
    loggingEnhancers = new ArrayList<>();
    List<LoggingEnhancer> resourceEnhancers = MonitoredResourceUtil.getResourceEnhancers();
    loggingEnhancers.addAll(resourceEnhancers);
    loggingEnhancers.addAll(getLoggingEnhancers());
    loggingEventEnhancers = new ArrayList<>();
    loggingEventEnhancers.addAll(getLoggingEventEnhancers());

    super.start();
  }
1075577
void start() {
    while (true) {
      try {
        submitReport();
        Thread.sleep(transmitPeriod);
      } catch (Exception e) {
        System.err.println(e);
        LOG.error(StringUtils.stringifyException(e));
      }
    }
  }
835504
public void start(PersistentTranId ptid, TransactionParticipant participant) throws XidAlreadyKnownException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "start", new Object[]{"PersistentTranId="+ptid, "Participant="+participant});

        // Defect 455354
        // We need to make sure that any changes to the association
        // lists occur under a lock.
        //
        // We also need to check the _unassociatedTrans and _suspendedTrans lists
        // to make sure that we aren't being asked to start a new branch using an
        // Xid that is still running or in the process of being completed.
        synchronized(_associationLock)
        {
            if (!_associatedTrans.containsKey(ptid) &&
                !_unassociatedTrans.containsKey(ptid) &&
                !_suspendedTrans.containsKey(ptid))
            {
                _associatedTrans.put(ptid, participant);
            }
            else
            {
                XidAlreadyKnownException xake = new XidAlreadyKnownException("XID_ALREADY_ASSOCIATED_SIMS1009", new Object[]{"start(XID,TMNOFLAGS)", ptid.toTMString()});
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Cannot start new association with this Xid. It is already known!", xake);
                if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
                throw xake;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start");
    }
102295
private void run(ReportOperation operation) throws ReportException {
        Set<String> executedPlugins = new HashSet<>();
        run(selectedReportPlugins, operation, executedPlugins);
        run(defaultReportPlugins, operation, executedPlugins);
    }
361276
public void start(String channelId) throws AlluxioStatusException {
    try {
      LOG.debug("Starting SASL handshake for ChannelId:{}", channelId);
      // Send the server initial message.
      mRequestObserver.onNext(mSaslHandshakeClientHandler.getInitialMessage(channelId));
      // Wait until authentication status changes.
      mAuthenticated.get(mGrpcAuthTimeoutMs, TimeUnit.MILLISECONDS);
    } catch (SaslException se) {
      throw new UnauthenticatedException(se.getMessage(), se);
    } catch (InterruptedException ie) {
      Thread.currentThread().interrupt();
      throw new UnavailableException(ie.getMessage(), ie);
    } catch (ExecutionException e) {
      Throwable cause = (e.getCause() != null) ? e.getCause() : e;
      if (cause != null && cause instanceof StatusRuntimeException) {
        StatusRuntimeException sre = (StatusRuntimeException) cause;
        // If caught unimplemented, that means server does not support authentication.
        if (sre.getStatus().getCode() == Status.Code.UNIMPLEMENTED) {
          throw new UnauthenticatedException("Authentication is disabled on target host.");
        }
        throw AlluxioStatusException.fromStatusRuntimeException((StatusRuntimeException) cause);
      }
      throw new UnknownException(cause.getMessage(), cause);
    } catch (TimeoutException e) {
      throw new UnavailableException(e);
    }
  }
269641
private synchronized boolean datanodeReportsReceived(boolean checkDatanodes) {
    try {
      boolean received = this.getDatanodeReportRatio() >=
        this.outStandingReportThreshold;
      if (!received && checkDatanodes) {
        checkDatanodes();
        return this.getDatanodeReportRatio() >= this.outStandingReportThreshold;
      }
      return received;
    } catch (Exception e) {
      LOG.warn("Failover - caught exception when checking reports", e);
      return false;
    }
  }
710688
@Override
    public void start(int mode) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "start, mode ", mode);

//        _eventNotificationEnabled = isEventNotificationPropertySet();
//        notifyMessagingEngineStarting(getName(), getUuid().toString(), "STANDARD_MODE");

        boolean startFailed = false;
        ListIterator<ComponentList> li = null;
        synchronized (stateChangeLock) {

            if (_state == STATE_STOPPED)
                setState(STATE_STARTING);

        } // synchronized (stateChangeLock)

        try {
            //Start the message store 
            _messageStore.start();
            //Start the message processor
            _messageProcessor.start(0);
            setState(STATE_STARTED);
        } catch (Exception e) {
            if (!(e.getCause() instanceof SeverePersistenceException))
                com.ibm.ws.ffdc.FFDCFilter.processException(e, CLASS_NAME + ".start", "626", this);
            SibTr.error(tc, "ME_CANNOT_BE_STARTED_SIAS0034", new Object[] { _name, "", "start()" });
            SibTr.exception(tc, e);
            startFailed = true;
        }

        if (startFailed) {
            SibTr.error(tc, "ME_RESTART_CHECK_SIAS0027", getName());
            stop(JsConstants.ME_STOP_FORCE);
            destroy();
            setState(STATE_STOPPED);
        } else {
            // Find the MP administrator class
            _mpAdmin = ((SIMPAdmin) getMessageProcessor()).getAdministrator();
            setState(STATE_STARTED);
        }

        if (!startFailed) {
            serverStarted();
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(this, tc, "Messaging Engine " + _name + " with UUID " + _uuid + " has been started.");
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                SibTr.debug(tc, "Messaging engine failed");

        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "start");
    }
548707
@Override
    public void start(BundleContext bc) throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "start", bc);
        }
    }
240760
public void sendStart(boolean restart) throws SIConnectionDroppedException, SIConnectionLostException        //471642
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "sendStart","restart="+restart);
      if (sessionId == 0)
      {
         // If the session Id = 0, then no one called setSessionId(). As such we are unable to flow
         // to the server as we do not know which session to instruct the server to use.
         SIErrorException e = new SIErrorException(
            nls.getFormattedMessage("SESSION_ID_HAS_NOT_BEEN_SET_SICO1043", null, null)
         );

         FFDCFilter.processException(e, CLASS_NAME + ".sendStart",
                                     CommsConstants.CONVERSATIONHELPERIMPL_03, this);

         if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, e.getMessage(), e);

         throw e;
      }

      CommsByteBuffer request = getCommsByteBuffer();
      // Connection object id
      request.putShort((short) connectionObjectId);
      // Consumer session id
      request.putShort(sessionId);

      final HandshakeProperties handshakeProps = conversation.getHandshakeProperties();
      final short fapVersion = handshakeProps.getFapLevel();

      // If a restart was requested and the conversation FAP version is >= 9 then send a restart segmentId so that
      // the other end knows that it should check the consumer session state is not stopped before processing the
      // request. When a stoppable async consumer callback is in use it is possible for message processor to stop
      // the consumer session in the server but for the notification not to reach the client until after the client
      // has requested the next batch of messages. By using a restart segmentId the client can tell the comms server
      // end to check the session state before processing the request. If it turns out that message processor has
      // stopped the consumer session then the start request is ignored.
      jfapSend(request,                                                                                         //471642
               (restart && fapVersion >= JFapChannelConstants.FAP_VERSION_9) ? JFapChannelConstants.SEG_RESTART_SESS : JFapChannelConstants.SEG_START_SESS,
               JFapChannelConstants.PRIORITY_MEDIUM,
               true,
               ThrottlingPolicy.BLOCK_THREAD);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "sendStart");
   }
1177267
@Override
  public final void shutdownNow(Status status) {
    shutdown(status);
    Collection<PendingStream> savedPendingStreams;
    Runnable savedReportTransportTerminated;
    synchronized (lock) {
      savedPendingStreams = pendingStreams;
      savedReportTransportTerminated = reportTransportTerminated;
      reportTransportTerminated = null;
      if (!pendingStreams.isEmpty()) {
        pendingStreams = Collections.emptyList();
      }
    }
    if (savedReportTransportTerminated != null) {
      for (PendingStream stream : savedPendingStreams) {
        stream.cancel(status);
      }
      syncContext.execute(savedReportTransportTerminated);
    }
    // If savedReportTransportTerminated == null, transportTerminated() has already been called in
    // shutdown().
  }
89496
public void sendAuditEvent(AuditEventMessage[] msgs, InetAddress destination, int port) throws Exception 
	{
        if (!EventUtils.isEmptyOrNull(msgs)) {
    		// Check to validate port
    		int portToUse = getTransportPort(port);
        	
        	DatagramSocket socket = new DatagramSocket();

    		for (int i=0; i<msgs.length; i++) {
    			byte[] msgBytes = getTransportPayload(msgs[i]);
    			send(msgBytes, socket, destination, portToUse);
    		}
           socket.close();
        }
	}