@ManagedObject(value="The HTTP/2 client transport") public class HttpClientTransportOverHTTP2 extends AbstractHttpClientTransport
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.ListenerLOGFAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPINGHTTP_CONNECTION_PROMISE_CONTEXT_KEY, HTTP_DESTINATION_CONTEXT_KEYCONNECTOR_CONTEXT_KEY| Constructor and Description |
|---|
HttpClientTransportOverHTTP2(HTTP2Client client) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.net.InetSocketAddress address,
java.util.Map<java.lang.String,java.lang.Object> context)
Establishes a physical connection to the given
address. |
protected void |
connect(SslContextFactory sslContextFactory,
java.net.InetSocketAddress address,
Session.Listener listener,
Promise<Session> promise,
java.util.Map<java.lang.String,java.lang.Object> context) |
protected void |
doStart()
Starts the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
HTTP2Client |
getHTTP2Client() |
int |
getSelectors() |
boolean |
isUseALPN() |
Connection |
newConnection(EndPoint endPoint,
java.util.Map<java.lang.String,java.lang.Object> context) |
protected HttpConnectionOverHTTP2 |
newHttpConnection(HttpDestination destination,
Session session) |
HttpDestination |
newHttpDestination(Origin origin)
Creates a new, transport-specific,
HttpDestination object. |
protected void |
onClose(HttpConnectionOverHTTP2 connection,
GoAwayFrame frame) |
void |
setUseALPN(boolean useALPN) |
getConnectionPoolFactory, getHttpClient, setConnectionPoolFactory, setHttpClientaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcustomizedumpObjects, dumpSelfpublic HttpClientTransportOverHTTP2(HTTP2Client client)
public HTTP2Client getHTTP2Client()
@ManagedAttribute(value="The number of selectors", readonly=true) public int getSelectors()
@ManagedAttribute(value="Whether ALPN should be used when establishing connections") public boolean isUseALPN()
public void setUseALPN(boolean useALPN)
protected void doStart()
throws java.lang.Exception
ContainerLifeCycledoStart in class ContainerLifeCyclejava.lang.Exceptionprotected void doStop()
throws java.lang.Exception
ContainerLifeCycledoStop in class ContainerLifeCyclejava.lang.Exceptionpublic HttpDestination newHttpDestination(Origin origin)
HttpClientTransportHttpDestination object.
HttpDestination controls the destination-connection cardinality: protocols like
HTTP have 1-N cardinality, while multiplexed protocols like HTTP/2 have a 1-1 cardinality.
origin - the destination originHttpDestination objectpublic void connect(java.net.InetSocketAddress address,
java.util.Map<java.lang.String,java.lang.Object> context)
HttpClientTransportaddress.address - the address to connect tocontext - the context information to establish the connectionprotected void connect(SslContextFactory sslContextFactory, java.net.InetSocketAddress address, Session.Listener listener, Promise<Session> promise, java.util.Map<java.lang.String,java.lang.Object> context)
public Connection newConnection(EndPoint endPoint, java.util.Map<java.lang.String,java.lang.Object> context) throws java.io.IOException
endPoint - the EndPoint to link the newly created connection tocontext - the context data to create the connectionConnectionjava.io.IOException - if the connection cannot be createdprotected HttpConnectionOverHTTP2 newHttpConnection(HttpDestination destination, Session session)
protected void onClose(HttpConnectionOverHTTP2 connection, GoAwayFrame frame)
Copyright © 1995–2023 Webtide. All rights reserved.