Called by the timeout manager when inactivity timer expires.
Needs to be synchronized as it may interfere with normal timeout.
427605
public synchronized void inactivityTimeout() {
        final boolean traceOn = TraceComponent.isAnyTracingEnabled();

        if (traceOn && tc.isEntryEnabled())
            Tr.entry(tc, "inactivityTimeout", this);

        _inactivityTimerActive = false;

        if (_inactivityTimer != null) {
            try {
                // important that this runs as part of synchronized block
                // to prevent context being re-imported while processing.
                _inactivityTimer.alarm();
            } catch (Throwable exc) {
                FFDCFilter.processException(exc, "com.ibm.ws.tx.jta.TransactionImpl.inactivityTimeout", "2796", this);
                if (traceOn && tc.isEventEnabled())
                    Tr.event(tc, "exception caught in inactivityTimeout", exc);
                // swallow
            } finally {
                _inactivityTimer = null;
            }

        } else {
            if (_activeAssociations <= 0) // off server ... do the rollback
            {
                final EmbeddableTranManagerSet tranManager = (EmbeddableTranManagerSet) TransactionManagerFactory.getTransactionManager();

                try {
                    // resume this onto the current thread and roll it back
                    tranManager.resume(this);
                    // PK15024
                    // If there is a superior server involved in this transaction, make sure it is told about this inactivity timeout.
                    try {
                        tranManager.setRollbackOnly();
                    } catch (Exception e) {
                        FFDCFilter.processException(e, "com.ibm.ws.Transaction.JTA.TransactionImpl.inactivityTimeout", "4353", this);
                        if (traceOn && tc.isDebugEnabled())
                            Tr.debug(tc, "inactivityTimeout setRollbackOnly threw exception", e);
                    }
                    // Mark it so that a bean on the superior server can test its status on return.
                    // PK15024
                    tranManager.rollback();
                } catch (Exception ex) {
                    if (traceOn && tc.isDebugEnabled())
                        Tr.debug(tc, "inactivityTimeout resume/rollback threw exception", ex);
                    // swallow this exception
                    // main timeout may have already rolled back!
                }
            }
        }

        if (traceOn && tc.isEntryEnabled())
            Tr.exit(tc, "inactivityTimeout");
    }
973065
def _timeout_thread(self, remain):
        """"""
        time.sleep(remain)
        if not self._ended:
            self._ended = True
            self._release_all()
1234261
def _expire(self):
        
        del self.map.addr[self.name]
        self.map.notify("addrmap_expired", *[self.name], **{})
70011
final void startActiveTimeoutMonitor(final ScheduledExecutorService inactiveMonitorService) {
      inactiveMonitorService.scheduleWithFixedDelay(new ActiveTimeoutMonitor(),
              activeTimeoutMonitorFrequencySeconds, activeTimeoutMonitorFrequencySeconds, TimeUnit.SECONDS);
   }
264359
public void timeout(ServletTimer timer) {
		SipApplicationSession sipApplicationSession = timer.getApplicationSession();
		Map<String, Object> attributes = (Map<String, Object>)timer.getInfo();
		try {			
			String callerAddress = (String)attributes.get("caller");
			String callerDomain = (String)attributes.get("callerDomain");
			SipURI fromURI = sipFactory.createSipURI(callerAddress, callerDomain);
			Address fromAddress = sipFactory.createAddress(fromURI);
			String customerName = (String) attributes.get("customerName");
			BigDecimal amount = (BigDecimal) attributes.get("amountOrder");
			String customerPhone = (String) attributes.get("customerPhone");
			String customerContact = (String) attributes.get("customerContact");
			Address toAddress = sipFactory.createAddress(customerPhone);									
			logger.info("preparing to call : "+ toAddress);
			SipServletRequest sipServletRequest = 
				sipFactory.createRequest(sipApplicationSession, "INVITE", fromAddress, toAddress);
			if(attributes.get("adminApproval") != null) {
				logger.info("preparing speech for admin approval");
				customerContact = (String) attributes.get("adminContactAddress");
				//TTS file creation		
				StringBuffer stringBuffer = new StringBuffer();
				stringBuffer.append(customerName);
				stringBuffer.append(" has placed an order of $");
				stringBuffer.append(amount);
				stringBuffer.append(". Press 1 to approve and 2 to reject.");				
				sipServletRequest.getSession().setAttribute("speechUri",
						java.net.URI.create("data:" + URLEncoder.encode("ts("+ stringBuffer +")", "UTF-8")));
				
			}			
			

			URI requestURI = sipFactory.createURI(customerContact);			
			sipServletRequest.setRequestURI(requestURI);
							
			//copying the attributes in the sip session since the media listener depends on it
			Iterator<Entry<String,Object>> attrIterator = attributes.entrySet().iterator();
			while (attrIterator.hasNext()) {
				Map.Entry<java.lang.String, java.lang.Object> entry = (Map.Entry<java.lang.String, java.lang.Object>) attrIterator
						.next();
				sipServletRequest.getSession().setAttribute(entry.getKey(), entry.getValue());
			}
			SipSession sipSession = sipServletRequest.getSession();
			
			if (sipSession.getAttribute("deliveryDate") != null) {			
				String announcementFile = MMSUtil.audioFilePath + "/OrderDeliveryDate.wav";
				sipServletRequest.getSession().setAttribute("speechUri",
				java.net.URI.create(announcementFile));
				logger.info("Preparing to play Delivery Date Announcement : " + announcementFile);
			} 
			
			//Media Server Control Creation
			MediaSession mediaSession = MMSUtil.getMsControl().createMediaSession();
			NetworkConnection conn = mediaSession
			.createNetworkConnection(NetworkConnection.BASIC);

			SdpPortManager sdpManag = conn.getSdpPortManager();
			
			sdpManag.generateSdpOffer();
			
			byte[] sdpOffer = null;
			int numTimes = 0;
			while(sdpOffer == null && numTimes<10) {
				sdpOffer = sdpManag.getMediaServerSessionDescription();
				Thread.sleep(500);
				numTimes++;
			}
			MediaGroup mg = mediaSession.createMediaGroup(MediaGroup.PLAYER_SIGNALDETECTOR);
			sipServletRequest.getSession().setAttribute("mediaGroup", mg);
			sipServletRequest.getSession().setAttribute("mediaSession", mediaSession);
			sipServletRequest.setContentLength(sdpOffer.length);
			sipServletRequest.setContent(sdpOffer, "application/sdp");	
			MediaConnectionListener listener = new MediaConnectionListener();
			listener.setInviteRequest(sipServletRequest);
//			provider.addConnectionListener(listener);
			sipServletRequest.getSession().setAttribute("connection", conn);
			sipServletRequest.send();
			mg.getSignalDetector().addListener(new DTMFListener(mg, sipServletRequest.getSession(), MMSUtil.audioFilePath));
			conn.join(Direction.DUPLEX, mg);
			logger.info("waiting to get the SDP from Media Server before sending the INVITE to " + callerAddress + "@" + callerDomain);
		} catch (Exception e) {
			logger.error("An unexpected exception occured while creating the request for delivery date", e);
		}
	}
620148
@Override
    public IPromise<T> onTimeout(Consumer timeoutHandler) {
        return then( (r,e) -> {
            if ( e == Timeout.INSTANCE ) {
                timeoutHandler.accept(e);
            }
        });
    }
264431
@Override
	public void stopped() {
		int s = status.get();
		if (s != STATUS_DISCONNECTED && s != STATUS_DISCONNECTING) {

			// Stop timers
			super.stopped();

			// Disconnect
			disconnect();

		}
	}
1092748
private void timeoutHasExpired(final Timeout timeout, final TimeoutExpirationContext context) {
        try {
            addMessage(timeout, context.getOriginalHeaders());
        } catch (Exception ex) {
            LOG.error("Error handling timeout {}", timeout, ex);
        }
    }
534119
public com.google.protobuf.Duration getIdleTimeout() {
    return idleTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : idleTimeout_;
  }
1163917
def timeout(self, timeout):
        '''
        '''
        if self._timeout is None:
            self.event('connection_made').bind(self._add_timeout)
            self.event('connection_lost').bind(self._cancel_timeout)
        self._timeout = timeout or 0
        self._add_timeout(None)
931573
function Timer(timeout, timeoutCallback) {
  this.finalTime = false;
  this.time = Date.now();
  this.TimerFunction = setTimeout(timeoutCallback, timeout);
}
912693
public void setTimeout(int pTimeout) {
        if (pTimeout < 0) {  // Must be positive
            throw new IllegalArgumentException("Timeout must be positive.");
        }
        timeout = pTimeout;
        if (socket != null) {
            try {
                socket.setSoTimeout(pTimeout);
            }
            catch (SocketException se) {
                // Not much to do about that...
            }
        }
    }
473258
private void timeout() {
        lock.writeLock().lock();
        try {
            //if already stopped, do nothing, otherwise check times and run the timeout task
            if (!this.stopped) {
                long now = System.nanoTime();
                long remaining = this.targetEnd - now;
                this.timedout = remaining <= FTConstants.MIN_TIMEOUT_NANO;

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    debugTime("!Start  {0}", this.start);
                    debugTime("!Target {0}", this.targetEnd);
                    debugTime("!Now    {0}", now);
                    debugTime("!Remain {0}", remaining);
                }

                //if we really have timedout then run the timeout task
                if (this.timedout) {
                    debugRelativeTime("Timeout!");
                    this.timeoutTask.run();
                } else {
                    //this shouldn't be possible but if the timer popped too early, restart it
                    debugTime("Premature Timeout!", remaining);
                    start(this.timeoutTask, remaining);
                }
            }
        } finally {
            lock.writeLock().unlock();
        }
    }
1318812
public boolean expire(boolean cancelTimer)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "expire", new Boolean(cancelTimer));

    if ((expiryHandle != null) && cancelTimer)
    {
      expiryHandle.cancel();
    }
    expiryHandle = null;
    if (!satisfied)
    {
      expired = true;
      if (TraceComponent.isAnyTracingEnabled() && UserTrace.tc_mt.isDebugEnabled())    
        SibTr.debug(UserTrace.tc_mt,       
           nls_mt.getFormattedMessage(
           "REMOTE_REQUEST_EXPIRED_CWSJU0033",
           new Object[] {
             tick},
           null));
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "expire", new Boolean(expired));

    return expired;
  }
1248261
@Deprecated
    public void setTimeout(long timeout, TimeUnit unit) {
        setTimeout(Duration.ofNanos(unit.toNanos(timeout)));
    }
659343
public AndroidRemoveApplicationOptions withTimeout(Duration timeout) {
        checkArgument(!checkNotNull(timeout).isNegative(),
                "The timeout value cannot be negative");
        this.timeout = timeout;
        return this;
    }
40483
def wait_for_disappearance(self, timeout=120):
        

        start = time.time()
        while self.exists():
            self.poco.sleep_for_polling_interval()
            if time.time() - start > timeout:
                raise PocoTargetTimeout('disappearance', self)