ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/coyote/http2/AbstractNonZeroStream.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/coyote/http2/AbstractNonZeroStream.java
Status
scanned
Type
file
Name
AbstractNonZeroStream.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
2732 (2.7 KB)
MD5
c32c9eed962da88c4e13504ff4a99acd
SHA1
e7e2ed1f144416f3697849c8b4390aa64473646e
SHA256
22369536fad542cc896e50c8210f77a50e49fb9199fbe85943c5e70ce14afa81
SHA512

      
    
SHA1_git
1c7f65268c65ea77c40a2231f8157cb355b953c5
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
AbstractNonZeroStream.java | 2.7 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.coyote.http2; import java.nio.ByteBuffer; /** * Base class for all streams other than stream 0, the connection. Primarily provides functionality shared between full * Stream and RecycledStream. */ abstract class AbstractNonZeroStream extends AbstractStream { protected static final ByteBuffer ZERO_LENGTH_BYTEBUFFER = ByteBuffer.allocate(0); protected final StreamStateMachine state; AbstractNonZeroStream(String connectionId, Integer identifier) { super(identifier); this.state = new StreamStateMachine(connectionId, getIdAsString()); } AbstractNonZeroStream(Integer identifier, StreamStateMachine state) { super(identifier); this.state = state; } /** * @return {@code true} if the state indicates a close */ final boolean isClosedFinal() { return state.isClosedFinal(); } /** * Check the frame type against the state * * @param frameType the type * * @throws Http2Exception if an error is detected */ final void checkState(FrameType frameType) throws Http2Exception { state.checkFrameType(frameType); } /** * Obtain the ByteBuffer to store DATA frame payload data for this stream that has been received from the client. * * @return {@code null} if the DATA frame payload can be swallowed, or a ByteBuffer with at least enough space * remaining for the current flow control window for stream data from the client. */ abstract ByteBuffer getInputByteBuffer(boolean create); /** * Notify that some data has been received. * * @param dataLength the byte count * * @throws Http2Exception if an error is detected */ abstract void receivedData(int dataLength) throws Http2Exception; }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
38.26
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9