public abstract class HttpClientTransport extends Object implements ClientTransport
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BUFFER_SIZE |
protected SignalRFuture<Void> |
mAbortFuture |
protected HttpConnection |
mHttpConnection |
protected boolean |
mStartedAbort |
| Constructor and Description |
|---|
HttpClientTransport(Logger logger,
HttpConnection httpConnection) |
HttpClientTransport(Logger logger,
String clientCertificatePath,
char[] clientCertificatePassword,
String clientCertificateAlias,
boolean ignoreSsl)
Initializes the HttpClientTransport with a logger
|
| Modifier and Type | Method and Description |
|---|---|
SignalRFuture<Void> |
abort(ConnectionBase connection)
Aborts the transport
|
protected void |
log(String message,
LogLevel level) |
protected void |
log(Throwable error) |
SignalRFuture<NegotiationResponse> |
negotiate(ConnectionBase connection)
Begins the negotiation with the server
|
SignalRFuture<Void> |
send(ConnectionBase connection,
String data,
DataResultCallback callback)
Sends data using the transport
|
protected void |
throwOnInvalidStatusCode(Response response) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, start, supportKeepAliveprotected static final int BUFFER_SIZE
protected HttpConnection mHttpConnection
protected boolean mStartedAbort
protected SignalRFuture<Void> mAbortFuture
public HttpClientTransport(Logger logger, String clientCertificatePath, char[] clientCertificatePassword, String clientCertificateAlias, boolean ignoreSsl)
logger - logger to log actionsclientCertificatePath - client certificate pathclientCertificatePassword - client certificate passwordclientCertificateAlias - client certificate aliasignoreSsl - ignore SSL certificate verificationpublic HttpClientTransport(Logger logger, HttpConnection httpConnection)
public SignalRFuture<NegotiationResponse> negotiate(ConnectionBase connection)
ClientTransportnegotiate in interface ClientTransportconnection - Connection information to do the negotiationpublic SignalRFuture<Void> send(ConnectionBase connection, String data, DataResultCallback callback)
ClientTransportsend in interface ClientTransportconnection - Connection information to send datadata - data to sendcallback - Callback to invoke when data is returnedpublic SignalRFuture<Void> abort(ConnectionBase connection)
ClientTransportabort in interface ClientTransportconnection - Connection information to abortprotected void throwOnInvalidStatusCode(Response response) throws InvalidHttpStatusCodeException
InvalidHttpStatusCodeExceptionprotected void log(Throwable error)
Copyright © 2019. All rights reserved.