Perform operations to transition into IDLE state

@param direction
@throws CompressionException
@throws FlowControlException
@throws ProtocolException
974690
private void processIdle(Constants.Direction direction) throws Http2Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "processIdle entry: stream " + myID);
        }
        // Can only receive HEADERS or PRIORITY frame in Idle state
        if (direction == Constants.Direction.READ_IN) {
            if (frameType == FrameTypes.HEADERS) {

                // check to see if too many client streams are currently open for this stream's h2 connection
                muxLink.incrementActiveClientStreams();
                if (muxLink.getActiveClientStreams() > muxLink.getLocalConnectionSettings().getMaxConcurrentStreams()) {
                    RefusedStreamException rse = new RefusedStreamException("too many client-initiated streams are currently active; rejecting this stream");
                    rse.setConnectionError(false);
                    throw rse;
                }

                processHeadersPriority();
                getHeadersFromFrame();

                if (currentFrame.flagEndHeadersSet()) {
                    processCompleteHeaders(false);
                    setHeadersComplete();
                } else {
                    muxLink.setContinuationExpected(true);
                }

                if (currentFrame.flagEndStreamSet()) {
                    endStream = true;
                    updateStreamState(StreamState.HALF_CLOSED_REMOTE);
                    if (currentFrame.flagEndHeadersSet()) {
                        setReadyForRead();
                    }
                } else {
                    updateStreamState(StreamState.OPEN);
                }
            }
        } else {
            // send out a HEADER frame and update the stream state to OPEN
            if (frameType == FrameTypes.HEADERS) {
                updateStreamState(StreamState.OPEN);
            }
            writeFrameSync();
        }
    }
1128915
public void transition(CopycatServer.State state) {
    checkThread();

    if (this.state != null && state == this.state.type()) {
      return;
    }

    LOGGER.info("{} - Transitioning to {}", cluster.member().address(), state);

    // Close the old state.
    try {
      this.state.close().get();
    } catch (InterruptedException | ExecutionException e) {
      throw new IllegalStateException("failed to close Raft state", e);
    }

    // Force state transitions to occur synchronously in order to prevent race conditions.
    try {
      this.state = createState(state);
      this.state.open().get();
    } catch (InterruptedException | ExecutionException e) {
      throw new IllegalStateException("failed to initialize Raft state", e);
    }

    stateChangeListeners.forEach(l -> l.accept(this.state.type()));
  }
1040458
public void setTranslation(List<? extends S> path, Direction1D direction, Tuple2D<?> position) {
		assert position != null : AssertMessages.notNullParameter(3);
		this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path);
		this.firstSegmentDirection = detectFirstSegmentDirection(direction);
		this.curvilineTranslation = position.getX();
		this.shiftTranslation = position.getY();
        this.isIdentity = null;
	}
1180582
private void goingAway(Status status) {
    lifecycleManager.notifyShutdown(status);
    final Status goAwayStatus = lifecycleManager.getShutdownStatus();
    final int lastKnownStream = connection().local().lastStreamKnownByPeer();
    try {
      connection().forEachActiveStream(new Http2StreamVisitor() {
        @Override
        public boolean visit(Http2Stream stream) throws Http2Exception {
          if (stream.id() > lastKnownStream) {
            NettyClientStream.TransportState clientStream = clientStream(stream);
            if (clientStream != null) {
              clientStream.transportReportStatus(
                  goAwayStatus, RpcProgress.REFUSED, false, new Metadata());
            }
            stream.close();
          }
          return true;
        }
      });
    } catch (Http2Exception e) {
      throw new RuntimeException(e);
    }
  }
1010846
protected void actionGoingToWarehouse()
    {
        if (checker.canCarry())
        {
            for (final ExtractorListener listener : listeners)
            {
                listener.notifyStartDropOff(resourceType, lastProgress);
            }
            speed = dropOffPerSecond / rate.getAsInt();
            state = ExtractorState.DROPOFF;
        }
    }
167755
public void untarFrom(InputStream _in, final TarCompression compression) throws IOException, InterruptedException {
        try {
            final InputStream in = new RemoteInputStream(_in, Flag.GREEDY);
            act(new UntarFrom(compression, in));
        } finally {
            _in.close();
        }
    }
153625
public synchronized void signal(String name) throws UnknownTransitionException {
        //check that start state defined
        if (start == null) {
            throw new IllegalStateException("The start sate is not defined");
        }

        //check that end state defined
        if (end == null) {
            throw new IllegalStateException("The end sate is not defined");
        }

        //ignore any signals if fsm reaches end state
//        if (state == end) {
//            return;
//        }

        String old = state.getName();
        //switch to next state
        state = state.signal(name);
        if (logger != null) {
            logger.debug(String.format("current state=%s, signal=%s, transition to=%s", old, name, state.getName()));
        }
    }
787246
public void setPath(List<? extends S> path, Direction1D direction) {
		this.path = path == null || path.isEmpty() ? null : new ArrayList<>(path);
		this.firstSegmentDirection = detectFirstSegmentDirection(direction);
	}
1369912
@Deprecated
    public void cliDisconnect(String cause) throws ExecutionException, InterruptedException {
        checkPermission(DISCONNECT);
        disconnect(new ByCLI(cause)).get();
    }
129094
protected <T1> void dispatchCommand(final BiConsumer<P, T1> action, final T1 routable1) {
    routingFor(routable1)
      .routees()
      .forEach(routee -> routee.receiveCommand(action, routable1));
  }
969378
public synchronized void onTransportTermination() {
    if (state != State.DISCONNECTED) {
      state = State.DISCONNECTED;
      if (shutdownFuture != null) {
        shutdownFuture.cancel(false);
      }
      if (pingFuture != null) {
        pingFuture.cancel(false);
        pingFuture = null;
      }
    }
  }
428913
function(action) {
            // if the action is a direction
            if(RL.Util.DIRECTIONS_4.indexOf(action) !== -1){
                var offsetCoord = RL.Util.getOffsetCoordsFromDirection(action),
                    moveToX = this.x + offsetCoord.x,
                    moveToY = this.y + offsetCoord.y;
                return this.move(moveToX, moveToY);
            }

            if(action === 'wait'){
                this.wait();
                return true;
            }

            return false;
        }
535919
void finishSuccessfully(ChannelPipeline pipeline, SessionProtocol protocol) {

        if (protocol == H1 || protocol == H1C) {
            addBeforeSessionHandler(pipeline, new Http1ResponseDecoder(pipeline.channel()));
        } else if (protocol == H2 || protocol == H2C) {
            final int initialWindow = clientFactory.http2InitialConnectionWindowSize();
            if (initialWindow > DEFAULT_WINDOW_SIZE) {
                incrementLocalWindowSize(pipeline, initialWindow - DEFAULT_WINDOW_SIZE);
            }
        }

        final long idleTimeoutMillis = clientFactory.idleTimeoutMillis();
        if (idleTimeoutMillis > 0) {
            pipeline.addFirst(new HttpClientIdleTimeoutHandler(idleTimeoutMillis));
        }

        pipeline.channel().eventLoop().execute(() -> pipeline.fireUserEventTriggered(protocol));
    }
660678
public void stopDrag() {
        mPhysicsDragger.stopDrag();

        mPhysicsContext.runOnPhysicsThread(new Runnable() {
            @Override
            public void run() {
                if (mRigidBodyDragMe != null) {
                    NativePhysics3DWorld.stopDrag(getNative());
                    mRigidBodyDragMe = null;
                }
            }
        });
    }
617222
void onTransportIdle() {
    isActive = false;
    if (shutdownFuture == null) {
      return;
    }
    if (shutdownFuture.isDone()) {
      shutdownDelayed = false;
      shutdownFuture = scheduler
          .schedule(shutdownTask, maxConnectionIdleInNanos, TimeUnit.NANOSECONDS);
    } else {
      nextIdleMonitorTime = ticker.nanoTime() + maxConnectionIdleInNanos;
    }
  }
773897
private void setRawDirection(SwipyRefreshLayoutDirection direction) {
        if (mDirection == direction) {
            return;
        }

        mDirection = direction;
        switch (mDirection) {
            case BOTTOM:
                mCurrentTargetOffsetTop = mOriginalOffsetTop = getMeasuredHeight();
                break;
            case TOP:
            default:
                mCurrentTargetOffsetTop = mOriginalOffsetTop = -mCircleView.getMeasuredHeight();
                break;
        }
    }
894630
protected void createTerminateSessionAction(final Flow flow) {
        val terminateSession = createActionState(flow,
            CasWebflowConstants.STATE_ID_TERMINATE_SESSION, createEvaluateAction(CasWebflowConstants.ACTION_ID_TERMINATE_SESSION));
        createStateDefaultTransition(terminateSession, CasWebflowConstants.STATE_ID_GATEWAY_REQUEST_CHECK);
    }