public class SSLAcceptor extends TCPAcceptor
Accepts SSL connections, and creates SSLSocket for any new one,
using a public and private keys.
SSL servers uses a public and private keys (with a public certificate and
a private key both in .pem format) to identify itself and cipher
all data during a connection. You can provide both certificates using
File objects or InputStreams.
A SSLAcceptor is just a layer over a TCPAcceptor, the full
documentation will be found in TCPAcceptor and Acceptor.
All sockets will be of type SSLSocket.
Note for Android: An SSL Acceptor in Android will fail its creation.
In general, use a Server in an Android app could lead into problems. If you
need one, your solution could be create the acceptor using these constructors
SSLAcceptor(IOService, SSLAcceptorConfigurator) or
SSLAcceptor(IOService, IOService, SSLAcceptorConfigurator). See
SSLSocket documentation to give you a clue that could help you to make
the custom configuration for Android.
bootstrap, channel, onConnection, service| Constructor and Description |
|---|
SSLAcceptor(IOService service,
java.io.File publicKey,
java.io.File privateKey)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
java.io.File publicKey,
java.io.File privateKey,
java.lang.String password)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
java.io.InputStream publicKey,
java.io.InputStream privateKey)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
java.io.InputStream publicKey,
java.io.InputStream privateKey,
java.lang.String password)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
IOService worker,
java.io.File publicKey,
java.io.File privateKey)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
IOService worker,
java.io.File publicKey,
java.io.File privateKey,
java.lang.String password)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
IOService worker,
java.io.InputStream publicKey,
java.io.InputStream privateKey)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
IOService worker,
java.io.InputStream publicKey,
java.io.InputStream privateKey,
java.lang.String password)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
IOService worker,
SSLAcceptorConfigurator configurator)
Creates a SSL acceptor for server applications.
|
SSLAcceptor(IOService service,
SSLAcceptorConfigurator configurator)
Creates a SSL acceptor for server applications.
|
| Modifier and Type | Method and Description |
|---|---|
protected TCPSocket |
createSocketForImplementation(io.netty.channel.socket.SocketChannel ch) |
acceptAsync, pendingConnections, setOnConnectionListeneraccept, bind, bind, bind, checkSocketCreated, close, closeAsync, createFuture, createFuture, onClose, setChildOption, setOption, waitForClosepublic SSLAcceptor(@NotNull
IOService service,
@NotNull
java.io.File publicKey,
@NotNull
java.io.File privateKey)
service - IOService for the acceptor and the socketspublicKey - a File to the public certificate in .pem formatprivateKey - a File to the public certificate in .pem formatpublic SSLAcceptor(@NotNull
IOService service,
@NotNull
java.io.InputStream publicKey,
@NotNull
java.io.InputStream privateKey)
service - IOService for the acceptor and the socketspublicKey - a InputStream to the public certificate in .pem formatprivateKey - a InputStream to the public certificate in .pem formatpublic SSLAcceptor(@NotNull
IOService service,
@NotNull
java.io.File publicKey,
@NotNull
java.io.File privateKey,
java.lang.String password)
service - IOService for the acceptor and the socketspublicKey - a File to the public certificate in .pem formatprivateKey - a File to the public certificate in .pem formatpassword - the private key passphrasepublic SSLAcceptor(@NotNull
IOService service,
@NotNull
java.io.InputStream publicKey,
@NotNull
java.io.InputStream privateKey,
java.lang.String password)
service - IOService for the acceptor and the socketspublicKey - a InputStream to the public certificate in .pem formatprivateKey - a InputStream to the public certificate in .pem formatpassword - the private key passphrasepublic SSLAcceptor(@NotNull
IOService service,
@NotNull
IOService worker,
@NotNull
java.io.File publicKey,
@NotNull
java.io.File privateKey)
public SSLAcceptor(@NotNull
IOService service,
@NotNull
IOService worker,
@NotNull
java.io.InputStream publicKey,
@NotNull
java.io.InputStream privateKey)
public SSLAcceptor(@NotNull
IOService service,
@NotNull
IOService worker,
@NotNull
java.io.File publicKey,
@NotNull
java.io.File privateKey,
java.lang.String password)
public SSLAcceptor(@NotNull
IOService service,
@NotNull
IOService worker,
@NotNull
java.io.InputStream publicKey,
@NotNull
java.io.InputStream privateKey,
java.lang.String password)
public SSLAcceptor(@NotNull
IOService service,
@NotNull
SSLAcceptorConfigurator configurator)
SSLSocket
done by the SSLAcceptorConfigurator implementation.public SSLAcceptor(@NotNull
IOService service,
@NotNull
IOService worker,
@NotNull
SSLAcceptorConfigurator configurator)
SSLSocket
done by the SSLAcceptorConfigurator implementation.@NotNull protected TCPSocket createSocketForImplementation(@NotNull io.netty.channel.socket.SocketChannel ch) throws java.io.IOException
createSocketForImplementation in class TCPAcceptorjava.io.IOException