Package org.cometd.client.http.jetty
Class JettyHttpClientTransport
- java.lang.Object
-
- org.cometd.common.AbstractTransport
-
- org.cometd.client.transport.ClientTransport
-
- org.cometd.client.transport.HttpClientTransport
-
- org.cometd.client.http.common.AbstractHttpClientTransport
-
- org.cometd.client.http.jetty.JettyHttpClientTransport
-
- All Implemented Interfaces:
Transport
public class JettyHttpClientTransport extends AbstractHttpClientTransport
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JettyHttpClientTransport.Factory
-
Nested classes/interfaces inherited from class org.cometd.client.transport.ClientTransport
ClientTransport.FailureHandler, ClientTransport.FailureInfo
-
-
Field Summary
-
Fields inherited from class org.cometd.client.http.common.AbstractHttpClientTransport
NAME, PREFIX
-
Fields inherited from class org.cometd.client.transport.ClientTransport
JSON_CONTEXT_OPTION, MAX_MESSAGE_SIZE_OPTION, MAX_NETWORK_DELAY_OPTION, MAX_SEND_BAYEUX_MESSAGE_SIZE_OPTION, SCHEDULER_OPTION, URL_OPTION
-
-
Constructor Summary
Constructors Constructor Description JettyHttpClientTransport(java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> options, java.util.concurrent.ScheduledExecutorService scheduler, org.eclipse.jetty.client.HttpClient httpClient)
JettyHttpClientTransport(java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> options, org.eclipse.jetty.client.HttpClient httpClient)
JettyHttpClientTransport(java.util.Map<java.lang.String,java.lang.Object> options, org.eclipse.jetty.client.HttpClient httpClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort(java.lang.Throwable failure)
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connect
s, without waiting for a response.protected void
customize(org.eclipse.jetty.client.api.Request request)
protected void
customize(org.eclipse.jetty.client.api.Request request, Promise<org.eclipse.jetty.client.api.Request> promise)
protected org.eclipse.jetty.client.HttpClient
getHttpClient()
void
init()
void
send(TransportListener listener, java.util.List<Message.Mutable> messages)
-
Methods inherited from class org.cometd.client.http.common.AbstractHttpClientTransport
accept, calculateMaxNetworkDelay, getAdvice, getMaxMessageSize, isAborted, isAppendMessageType, newRequestURI, processResponseContent, processResponseMessages, processWrongResponseCode, setAdvice, terminate
-
Methods inherited from class org.cometd.client.transport.HttpClientTransport
getCookies, getCookieStore, setCookieStore, storeCookies
-
Methods inherited from class org.cometd.client.transport.ClientTransport
generateJSON, getJSONContextClient, getMaxNetworkDelay, getScheduler, getURL, initScheduler, parseMessages, setMaxNetworkDelay, setURL, shutdownScheduler
-
Methods inherited from class org.cometd.common.AbstractTransport
getName, getOption, getOption, getOption, getOption, getOption, getOptionNames, getOptionPrefix, setOption, setOptionPrefix
-
-
-
-
Constructor Detail
-
JettyHttpClientTransport
public JettyHttpClientTransport(java.util.Map<java.lang.String,java.lang.Object> options, org.eclipse.jetty.client.HttpClient httpClient)
-
JettyHttpClientTransport
public JettyHttpClientTransport(java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> options, org.eclipse.jetty.client.HttpClient httpClient)
-
JettyHttpClientTransport
public JettyHttpClientTransport(java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> options, java.util.concurrent.ScheduledExecutorService scheduler, org.eclipse.jetty.client.HttpClient httpClient)
-
-
Method Detail
-
getHttpClient
protected org.eclipse.jetty.client.HttpClient getHttpClient()
-
init
public void init()
- Overrides:
init
in classAbstractHttpClientTransport
-
abort
public void abort(java.lang.Throwable failure)
Description copied from class:ClientTransport
Aborts this transport, usually by cancelling all pending Bayeux messages that require a response, such as/meta/connect
s, without waiting for a response.- Overrides:
abort
in classAbstractHttpClientTransport
- Parameters:
failure
- the cause of the abort- See Also:
BayeuxClient.abort()
-
send
public void send(TransportListener listener, java.util.List<Message.Mutable> messages)
- Specified by:
send
in classClientTransport
-
customize
protected void customize(org.eclipse.jetty.client.api.Request request)
-
customize
protected void customize(org.eclipse.jetty.client.api.Request request, Promise<org.eclipse.jetty.client.api.Request> promise)
-
-