- ChunkedOutputStream - Class in serguei.http
-
Output stream that produces chunked transfer encoded output.
- ChunkedOutputStream(OutputStream) - Constructor for class serguei.http.ChunkedOutputStream
-
Create a new instance of ChunkedOutputStream by wrapping around OutputStream
The underlying output stream will be left open if we call close() on this instance
- ChunkedOutputStream(OutputStream, int) - Constructor for class serguei.http.ChunkedOutputStream
-
Create a new instance of ChunkedOutputStream by wrapping around OutputStream
The underlying output stream will be left open if we call close() on this instance
- ChunkedOutputStream(OutputStream, boolean) - Constructor for class serguei.http.ChunkedOutputStream
-
Create a new instance of ChunkedOutputStream by wrapping around OutputStream
- ChunkedOutputStream(OutputStream, int, boolean) - Constructor for class serguei.http.ChunkedOutputStream
-
Create a new instance of ChunkedOutputStream by wrapping around OutputStream
- ClientHello - Class in serguei.http
-
- close() - Method in class serguei.http.ChunkedOutputStream
-
This finishes write by writing last chunk and then, if the instance was created with parameter
leaveUnderlyingStreamOpen set to false, closes the underlying stream, otherwise it flushes it and leave opened
- close() - Method in class serguei.http.HttpClientConnection
-
Close the connection to the server
- closeAllConnection() - Method in class serguei.http.HttpServer
-
Closes all connections immediately without waiting for the processing to finish The server will continue to
accept new connections
- closeConnection() - Method in class serguei.http.ConnectionContext
-
Close connection to the client (sends FIN)
- closeQuietly(Closeable) - Static method in class serguei.http.utils.Utils
-
- concat(byte[]...) - Static method in class serguei.http.utils.Utils
-
- concatWithDelimiter(String[], String) - Static method in class serguei.http.utils.Utils
-
- connect() - Method in class serguei.http.HttpClientConnection
-
Connects to the server.
- ConnectionContext - Class in serguei.http
-
Context of the client's TCP connection from the point of view of the server
- connectRequest(String) - Static method in class serguei.http.HttpRequestHeaders
-
Creates request headers for CONNECT request
- getBody() - Method in class serguei.http.MultipartFormDataRequestBody
-
- getBodyAsStream() - Method in class serguei.http.HttpRequest
-
This returns the body of the request as a stream
Please note it is the user needs to close this stream if connection is to be reused
- getBodyAsStream() - Method in class serguei.http.HttpResponse
-
This returns the body of the response as a stream
Please note it is the user needs to close this stream if connection is to be reused
- getBytesValue(String) - Method in class serguei.http.RequestValues
-
- getCode() - Method in class serguei.http.TlsVersion
-
- getConnectionNo() - Method in class serguei.http.HttpServer
-
- getConnectionsCreated() - Method in class serguei.http.HttpServer
-
- getContentAsBytes() - Method in class serguei.http.BodyPart
-
- getContentAsString() - Method in class serguei.http.BodyPart
-
- getContentLength() - Method in class serguei.http.HttpRequest
-
- getContentLength() - Method in class serguei.http.HttpResponse
-
- getContentType() - Method in class serguei.http.BodyPart
-
- getContentType(String) - Method in class serguei.http.RequestValues
-
- getFilename() - Method in class serguei.http.BodyPart
-
- getFileName(String) - Method in class serguei.http.RequestValues
-
- getHeader(String) - Method in class serguei.http.HttpRequest
-
This returns an HTTP header by name, if there are more then one header with this name, the first one will be
returned, if header with this name does not exist, null is returned.
- getHeader(String) - Method in class serguei.http.HttpResponse
-
This returns an HTTP header by name, if there are more then one header with this name, the first one will be
returned, if header with this name does not exist, null is returned.
- getHeaders(String) - Method in class serguei.http.HttpRequest
-
This returns headers by name, if there are more then one header with this name, all of them will be returned, if
headers with this name don't exist, an empty list is returned The name is not case-sensitive.
- getHeaders() - Method in class serguei.http.HttpRequest
-
- getHeaders(String) - Method in class serguei.http.HttpResponse
-
This returns headers by name, if there are more then one header with this name, all of them will be returned, if
headers with this name don't exist, an empty list is returned The name is not case-sensitive.
- getHeaders() - Method in class serguei.http.HttpResponse
-
- getHost() - Method in class serguei.http.HttpRequest
-
- getHost() - Method in class serguei.http.HttpRequestHeaders
-
This returns host from Host header or, if Host header does not exist (e.g.
- getMajor() - Method in class serguei.http.TlsVersion
-
- getMethod() - Method in class serguei.http.HttpRequest
-
- getMethod() - Method in class serguei.http.HttpRequestHeaders
-
- getMinor() - Method in class serguei.http.TlsVersion
-
- getName() - Method in class serguei.http.BodyPart
-
- getNegotiatedCipher() - Method in class serguei.http.ConnectionContext
-
- getNegotiatedCipher() - Method in class serguei.http.HttpClientConnection
-
- getNegotiatedTlsProtocol() - Method in class serguei.http.ConnectionContext
-
- getNegotiatedTlsProtocol() - Method in class serguei.http.HttpClientConnection
-
- getPath() - Method in class serguei.http.HttpRequestHeaders
-
- getPort() - Method in class serguei.http.examples.ServerRespondingWithChunkedBody
-
- getPort() - Method in class serguei.http.examples.ServerWithPostForm
-
- getProtocolVersion() - Method in class serguei.http.ClientHello
-
- getReason() - Method in class serguei.http.HttpResponse
-
- getReason() - Method in class serguei.http.HttpResponseHeaders
-
- getRecordProtocolVersion() - Method in class serguei.http.ClientHello
-
- getRemoteAddress() - Method in class serguei.http.ConnectionContext
-
- getRequest(String) - Static method in class serguei.http.HttpRequestHeaders
-
Creates request headers for GET request
- getRequestHandler() - Method in class serguei.http.HttpServer
-
- getSni() - Method in class serguei.http.ConnectionContext
-
- getSniHostName() - Method in class serguei.http.ClientHello
-
- getSocketSourcePort() - Method in class serguei.http.HttpClientConnection
-
- getStatusCode() - Method in class serguei.http.HttpResponse
-
- getStatusCode() - Method in class serguei.http.HttpResponseHeaders
-
- getTlsCertificates() - Method in class serguei.http.ConnectionContext
-
- getTlsCertificates() - Method in class serguei.http.HttpClientConnection
-
- getTlsSessionId() - Method in class serguei.http.ConnectionContext
-
- getTlsSessionId() - Method in class serguei.http.HttpClientConnection
-
- getUrl() - Method in class serguei.http.HttpRequest
-
- getUrl() - Method in class serguei.http.HttpRequestHeaders
-
This returns Url based on command line and host header.
- getValue(String) - Method in class serguei.http.RequestValues
-
- getVersion() - Method in class serguei.http.HttpRequest
-
- getVersion() - Method in class serguei.http.HttpRequestHeaders
-
- getVersion() - Method in class serguei.http.HttpResponse
-
- getVersion() - Method in class serguei.http.HttpResponseHeaders
-
- GetWeatherInLondon - Class in serguei.http.examples
-
This is an example of using HttpClientConnection
This program makes request to a free weather API with a request for weather in London and then extract temperature
from returned JSON.
- GetWeatherInLondon(OutputStream) - Constructor for class serguei.http.examples.GetWeatherInLondon
-
- hashCode() - Method in class serguei.http.TlsVersion
-
- hasMultipartBody() - Method in class serguei.http.HttpRequest
-
- higherOrEqualTo(TlsVersion) - Method in class serguei.http.TlsVersion
-
- HttpClientConnection - Class in serguei.http
-
HTTP client connection - a simple HTTP client
- HttpClientConnection(String, int) - Constructor for class serguei.http.HttpClientConnection
-
Create an instance of HttpClientConnection.
- HttpClientConnection(InetSocketAddress) - Constructor for class serguei.http.HttpClientConnection
-
Create an instance of HttpClientConnection.
- HttpException - Exception in serguei.http
-
- HttpException(String) - Constructor for exception serguei.http.HttpException
-
- HttpRequest - Class in serguei.http
-
This represents a request as received by a server
- HttpRequest(InputStream) - Constructor for class serguei.http.HttpRequest
-
- HttpRequestHeaders - Class in serguei.http
-
This represents request headers - combination of the the request line and the following headers as specified in
RFC-2616: https://tools.ietf.org/html/rfc2616
This class is mutable and it is not thread safe.
- HttpRequestHeaders(String, String...) - Constructor for class serguei.http.HttpRequestHeaders
-
This creates an instance of HttpRequestHeaders
- HttpRequestHeaders(InputStream) - Constructor for class serguei.http.HttpRequestHeaders
-
This creates an instance of this class by reading request line and headers from a stream
- HttpResponse - Class in serguei.http
-
This represents a response as received by a client
- HttpResponse(InputStream) - Constructor for class serguei.http.HttpResponse
-
- HttpResponseHeaders - Class in serguei.http
-
This represents response headers - combination of the the status line and the following headers as specified in
RFC-2616: https://tools.ietf.org/html/rfc2616
This class is mutable and it is not thread safe.
- HttpResponseHeaders(String, String...) - Constructor for class serguei.http.HttpResponseHeaders
-
This creates an instance of HttpResponseHeaders
- HttpResponseHeaders(InputStream) - Constructor for class serguei.http.HttpResponseHeaders
-
This creates an instance of this class by reading status line and headers from a stream
- HttpServer - Class in serguei.http
-
This is HTTP Server.
- HttpServer(HttpServerRequestHandler, int) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to one ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, InetAddress, int) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to one ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, int, int, String, String, String) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, int, int, String, String, String, TrustManager) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, int, int, KeyStore, String, TrustManager) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, int, int, KeyStore, String) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, InetAddress, int, int, String, String, String) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, InetAddress, int, int, KeyStore, String) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, InetAddress, int, int, String, String, String, TrustManager) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServer(HttpServerRequestHandler, InetAddress, int, int, KeyStore, String, TrustManager) - Constructor for class serguei.http.HttpServer
-
Creating an instance of HttpServer listening to two ports (this does not actually start the server - call start()
for that).
- HttpServerOnConnectProcess - Interface in serguei.http
-
- HttpServerOnRequestHeadersProcess - Interface in serguei.http
-
- HttpServerRequestHandler - Interface in serguei.http
-
This is request handler.
- send(HttpRequestHeaders) - Method in class serguei.http.HttpClientConnection
-
This sends a request without body and waits for a response.
- send(HttpRequestHeaders, String) - Method in class serguei.http.HttpClientConnection
-
This sends a request with a body and waits for a response.
- send(HttpRequestHeaders, String, BodyCompression) - Method in class serguei.http.HttpClientConnection
-
This sends a request with a body and waits for a response.
- send(HttpRequestHeaders, byte[]) - Method in class serguei.http.HttpClientConnection
-
This sends a request with a body and waits for a response.
- send(HttpRequestHeaders, byte[], BodyCompression) - Method in class serguei.http.HttpClientConnection
-
This sends a request with a body and waits for a response.
- send(HttpRequestHeaders, InputStream) - Method in class serguei.http.HttpClientConnection
-
This sends a request with a body and waits for a response.
- send(HttpRequestHeaders, InputStream, BodyCompression) - Method in class serguei.http.HttpClientConnection
-
This sends a request with a body and waits for a response.
- send(byte[]) - Method in class serguei.http.HttpClientConnection
-
This sends data to the server and waits for a response.
- sendConnectRequest(String) - Method in class serguei.http.HttpClientConnection
-
This will send a CONNECT request and wait for a response, expecting to receive 200 OK.
- sendRequest(String, String...) - Method in class serguei.http.HttpClientConnection
-
This sends a request without body and waits for response.
- serguei.http - package serguei.http
-
- serguei.http.examples - package serguei.http.examples
-
- serguei.http.performance - package serguei.http.performance
-
- serguei.http.utils - package serguei.http.utils
-
- serverError() - Static method in class serguei.http.HttpResponseHeaders
-
- ServerRespondingWithChunkedBody - Class in serguei.http.examples
-
This is an example of a very simple web server that returns response with a chunked body
Just run it and, after running, point your browser to http://localhost:8080/
- ServerRespondingWithChunkedBody(InputStream) - Constructor for class serguei.http.examples.ServerRespondingWithChunkedBody
-
- ServerWithPostForm - Class in serguei.http.examples
-
This is an example of a very simple web server that shows a screen allowing to create a normal and multi-part POST
requests
Just run it and, after running, point your browser to http://localhost:8080/
- ServerWithPostForm(InputStream) - Constructor for class serguei.http.examples.ServerWithPostForm
-
- setCipherSuites(String...) - Method in class serguei.http.HttpClientConnection
-
- setCipherSuites(String...) - Method in class serguei.http.HttpServer
-
- setNeedClientAuthentication(boolean) - Method in class serguei.http.HttpServer
-
This requests a client to provide authentication certificate (TLS only)
- setOnConnectHandler(HttpServerOnConnectProcess) - Method in class serguei.http.HttpServer
-
Sets a handler that will be called immediately after the connection to the server is made, in case of TLS
connection, also after the handshake took place
- setOnRequestHeadersHandler(HttpServerOnRequestHeadersProcess) - Method in class serguei.http.HttpServer
-
Sets a handler that will be called immediately after the request headers are read but before reading the request
body (if any)
- setTcpNoDelay(boolean) - Method in class serguei.http.HttpClientConnection
-
Switch TCP_NODELAY
When it is TCP_NODELAY is on, Nagle's algorithm is switched off
- setTcpNoDelay(boolean) - Method in class serguei.http.HttpServer
-
Switch TCP_NODELAY
When it is TCP_NODELAY is on, Nagle's algorithm is switched off
This will affect new connections only
- setThrottlingDelay(int) - Method in class serguei.http.HttpServer
-
If set to a value of more then zero, this introduces a delay between every 100 bytes read from input stream.
- setTimeoutMillis(int) - Method in class serguei.http.HttpClientConnection
-
Sets timeout for IO operations on socket
- setTimeoutMils(int) - Method in class serguei.http.HttpServer
-
Set timeout on client connection.
- setTlsProtocol(TlsVersion...) - Method in class serguei.http.HttpClientConnection
-
- setTlsProtocol(TlsVersion...) - Method in class serguei.http.HttpServer
-
- shouldFailWhenNoSni(boolean) - Method in class serguei.http.HttpServer
-
- shouldWarnWhenSniNotMatching(boolean) - Method in class serguei.http.HttpServer
-
- SSLv2Hello - Static variable in class serguei.http.TlsVersion
-
- SSLv3 - Static variable in class serguei.http.TlsVersion
-
- start() - Method in class serguei.http.HttpServer
-
Starts the server.
- start(int, int) - Method in class serguei.http.HttpServer
-
Starts the server making several attempts.
- start(int, int, int) - Method in class serguei.http.HttpServer
-
Starts the server making several attempts.
- startHandshake() - Method in class serguei.http.HttpClientConnection
-
Start TLS connection without validating certificates received from the server.
- startHandshake(String) - Method in class serguei.http.HttpClientConnection
-
Start TLS connection without validating certificates received from the server sending specified host name as part
of ClientHello.
- startHandshakeAndValidate() - Method in class serguei.http.HttpClientConnection
-
Start TLS connection validating certificates received from the server using default trust manager.
- startHandshakeAndValidate(String) - Method in class serguei.http.HttpClientConnection
-
Start TLS connection validating certificates received from the server using default trust manager.
- startHandshakeWithClientAuth(String, String, String, String) - Method in class serguei.http.HttpClientConnection
-
Start TLS connection without validating certificates received from the server sending specified host name as part
of ClientHello and a certificate for client validation.
- startHandshakeWithClientAuthAndValidate(String, String, String, String) - Method in class serguei.http.HttpClientConnection
-
Start TLS connection validating certificates received from the server sending specified host name as part of
ClientHello and a certificate for client validation.
- stop() - Method in class serguei.http.HttpServer
-
Stops the server.
- stopNow() - Method in class serguei.http.HttpServer
-
Stops the server.