Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1683846 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Jun 5, 2015
1 parent b9b99f6 commit cdeaa5f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions java/org/apache/coyote/http2/Http2UpgradeHandler.java
Expand Up @@ -423,7 +423,7 @@ void writeBody(Stream stream, ByteBuffer data, int len) throws IOException {
header[3] = FrameType.DATA.getIdByte();
if (stream.getOutputBuffer().isFinished()) {
header[4] = FLAG_END_OF_STREAM;
stream.sendEndOfStream();
stream.sentEndOfStream();
}
ByteUtil.set31Bits(header, 5, stream.getIdentifier().intValue());
socketWrapper.write(true, header, 0, header.length);
Expand Down Expand Up @@ -720,7 +720,7 @@ public ByteBuffer getInputByteBuffer(int streamId, int payloadSize) throws Http2
public void receiveEndOfStream(int streamId) {
Stream stream = getStream(streamId);
if (stream != null) {
stream.receiveEndOfStream();
stream.receivedEndOfStream();
}
}

Expand Down Expand Up @@ -749,7 +749,7 @@ public void reprioritise(int streamId, int parentStreamId,
@Override
public void headersEnd(int streamId) {
Stream stream = getStream(streamId);
stream.headersEnd();
stream.receivedEndOfHeaders();
// Process this stream on a container thread
StreamProcessor streamProcessor = new StreamProcessor(stream, adapter, socketWrapper);
streamProcessor.setSslSupport(sslSupport);
Expand Down
16 changes: 8 additions & 8 deletions java/org/apache/coyote/http2/Stream.java
Expand Up @@ -66,9 +66,9 @@ public Stream(Integer identifier, Http2UpgradeHandler handler, Request coyoteReq
this.coyoteRequest = coyoteRequest;
this.inputBuffer = null;
// Headers have been populated by this point
state.receiveHeaders();
state.receivedEndOfHeaders();
// TODO Assuming the body has been read at this point is not valid
state.recieveEndOfStream();
state.recievedEndOfStream();
}
this.coyoteResponse.setOutputBuffer(outputBuffer);
this.coyoteRequest.setResponse(coyoteResponse);
Expand Down Expand Up @@ -235,18 +235,18 @@ ByteBuffer getInputByteBuffer() {
}


void headersEnd() {
state.receiveHeaders();
void receivedEndOfHeaders() {
state.receivedEndOfHeaders();
}


void receiveEndOfStream() {
state.recieveEndOfStream();
void receivedEndOfStream() {
state.recievedEndOfStream();
}


void sendEndOfStream() {
state.sendEndOfStream();
void sentEndOfStream() {
state.sentEndOfStream();
}


Expand Down
12 changes: 6 additions & 6 deletions java/org/apache/coyote/http2/StreamStateMachine.java
Expand Up @@ -48,35 +48,35 @@ public StreamStateMachine(Stream stream) {
}


public synchronized void sendPushPromise() {
public synchronized void sentPushPromise() {
stateChange(State.IDLE, State.RESERVED_LOCAL);
}


public synchronized void receivePushPromis() {
public synchronized void receivedPushPromis() {
stateChange(State.IDLE, State.RESERVED_REMOTE);
}


public synchronized void sendHeaders() {
public synchronized void sentEndOfHeaders() {
stateChange(State.IDLE, State.OPEN);
stateChange(State.RESERVED_LOCAL, State.HALF_CLOSED_REMOTE);
}


public synchronized void receiveHeaders() {
public synchronized void receivedEndOfHeaders() {
stateChange(State.IDLE, State.OPEN);
stateChange(State.RESERVED_REMOTE, State.HALF_CLOSED_LOCAL);
}


public synchronized void sendEndOfStream() {
public synchronized void sentEndOfStream() {
stateChange(State.OPEN, State.HALF_CLOSED_LOCAL);
stateChange(State.HALF_CLOSED_REMOTE, State.CLOSED_TX);
}


public synchronized void recieveEndOfStream() {
public synchronized void recievedEndOfStream() {
stateChange(State.OPEN, State.HALF_CLOSED_REMOTE);
stateChange(State.HALF_CLOSED_LOCAL, State.CLOSED_RX);
}
Expand Down

0 comments on commit cdeaa5f

Please sign in to comment.