Class ServerH2StreamMultiplexer
- java.lang.Object
-
- org.apache.hc.core5.http2.impl.nio.ServerH2StreamMultiplexer
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.hc.core5.http.HttpConnection,org.apache.hc.core5.http.SocketModalCloseable,org.apache.hc.core5.io.ModalCloseable,org.apache.hc.core5.util.Identifiable
@Internal public class ServerH2StreamMultiplexer extends java.lang.ObjectI/O event handler for events fired byProtocolIOSessionthat implements server side HTTP/2 messaging protocol with full support for multiplexed message transmission.- Since:
- 5.0
-
-
Constructor Summary
Constructors Constructor Description ServerH2StreamMultiplexer(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, H2Config h2Config)ServerH2StreamMultiplexer(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, FrameFactory frameFactory, org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, H2Config h2Config, H2StreamListener streamListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidclose(org.apache.hc.core5.io.CloseMode closeMode)org.apache.hc.core5.http.EndpointDetailsgetEndpointDetails()java.lang.StringgetId()java.net.SocketAddressgetLocalAddress()org.apache.hc.core5.http.ProtocolVersiongetProtocolVersion()java.net.SocketAddressgetRemoteAddress()org.apache.hc.core5.util.TimeoutgetSocketTimeout()javax.net.ssl.SSLSessiongetSSLSession()booleanisOpen()voidonConnect()voidonDisconnect()voidonException(java.lang.Exception cause)voidonInput(java.nio.ByteBuffer src)voidonOutput()voidonTimeout(org.apache.hc.core5.util.Timeout timeout)voidsetSocketTimeout(org.apache.hc.core5.util.Timeout timeout)intstreamCount()java.lang.StringtoString()
-
-
-
Constructor Detail
-
ServerH2StreamMultiplexer
public ServerH2StreamMultiplexer(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, FrameFactory frameFactory, org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, H2Config h2Config, H2StreamListener streamListener)
-
ServerH2StreamMultiplexer
public ServerH2StreamMultiplexer(org.apache.hc.core5.reactor.ProtocolIOSession ioSession, org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor, org.apache.hc.core5.http.nio.HandlerFactory<org.apache.hc.core5.http.nio.AsyncServerExchangeHandler> exchangeHandlerFactory, org.apache.hc.core5.http.config.CharCodingConfig charCodingConfig, H2Config h2Config)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfaceorg.apache.hc.core5.util.Identifiable
-
onConnect
public final void onConnect() throws org.apache.hc.core5.http.HttpException, java.io.IOException- Throws:
org.apache.hc.core5.http.HttpExceptionjava.io.IOException
-
onInput
public final void onInput(java.nio.ByteBuffer src) throws org.apache.hc.core5.http.HttpException, java.io.IOException- Throws:
org.apache.hc.core5.http.HttpExceptionjava.io.IOException
-
onOutput
public final void onOutput() throws org.apache.hc.core5.http.HttpException, java.io.IOException- Throws:
org.apache.hc.core5.http.HttpExceptionjava.io.IOException
-
onTimeout
public final void onTimeout(org.apache.hc.core5.util.Timeout timeout) throws org.apache.hc.core5.http.HttpException, java.io.IOException- Throws:
org.apache.hc.core5.http.HttpExceptionjava.io.IOException
-
onDisconnect
public final void onDisconnect()
-
onException
public final void onException(java.lang.Exception cause)
-
streamCount
public int streamCount()
- Since:
- 5.5
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfaceorg.apache.hc.core5.http.HttpConnection- Throws:
java.io.IOException
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode)
- Specified by:
closein interfaceorg.apache.hc.core5.io.ModalCloseable
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfaceorg.apache.hc.core5.http.HttpConnection
-
setSocketTimeout
public void setSocketTimeout(org.apache.hc.core5.util.Timeout timeout)
- Specified by:
setSocketTimeoutin interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
getSSLSession
public javax.net.ssl.SSLSession getSSLSession()
- Specified by:
getSSLSessionin interfaceorg.apache.hc.core5.http.HttpConnection
-
getEndpointDetails
public org.apache.hc.core5.http.EndpointDetails getEndpointDetails()
- Specified by:
getEndpointDetailsin interfaceorg.apache.hc.core5.http.HttpConnection
-
getSocketTimeout
public org.apache.hc.core5.util.Timeout getSocketTimeout()
- Specified by:
getSocketTimeoutin interfaceorg.apache.hc.core5.http.SocketModalCloseable
-
getProtocolVersion
public org.apache.hc.core5.http.ProtocolVersion getProtocolVersion()
- Specified by:
getProtocolVersionin interfaceorg.apache.hc.core5.http.HttpConnection
-
getRemoteAddress
public java.net.SocketAddress getRemoteAddress()
- Specified by:
getRemoteAddressin interfaceorg.apache.hc.core5.http.HttpConnection
-
getLocalAddress
public java.net.SocketAddress getLocalAddress()
- Specified by:
getLocalAddressin interfaceorg.apache.hc.core5.http.HttpConnection
-
-