Top Fields Constructors Methods
io.undertow.protocols.ssl

pack-priv Class UndertowAcceptingSslChannel

extends Object
implements AcceptingChannel<SslConnection>
Class Inheritance
All Implemented Interfaces
org.xnio.channels.AcceptingChannel, org.xnio.channels.SimpleAcceptingChannel, org.xnio.channels.SuspendableAcceptChannel, org.xnio.channels.CloseableChannel, org.xnio.channels.Configurable, java.nio.channels.InterruptibleChannel, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable, org.xnio.channels.BoundChannel
Imports
io.undertow.UndertowLogger, .UndertowOptions, io.undertow.connector.ByteBufferPool, org.xnio.ChannelListener, .ChannelListeners, .IoUtils, .Option, .OptionMap, .Options, .Sequence, .SslClientAuthMode, .StreamConnection, .Xnio, .XnioExecutor, .XnioIoThread, .XnioWorker, org.xnio.channels.AcceptingChannel, org.xnio.ssl.SslConnection, java.io.IOException, java.net.InetAddress, .InetSocketAddress, .SocketAddress, java.util.ArrayList, .Arrays, .HashSet, .List, .Set, java.util.concurrent.TimeUnit, java.util.concurrent.atomic.AtomicIntegerFieldUpdater, .AtomicReferenceFieldUpdater, javax.net.ssl.SSLEngine, .SSLParameters

Author
Stuart Douglas

Field Summary

Modifier and TypeField and Description
private final ChannelListener.Setter<AcceptingChannel<SslConnection>>
protected final ByteBufferPool
private volatile String[]
private volatile SslClientAuthMode
private static final AtomicReferenceFieldUpdater<UndertowAcceptingSslChannel, SslClientAuthMode>
private final ChannelListener.Setter<AcceptingChannel<SslConnection>>
private volatile int
private static final AtomicIntegerFieldUpdater<UndertowAcceptingSslChannel>
private volatile String[]
private final UndertowXnioSsl
protected final boolean
private static final Set<Option<?>>
private final AcceptingChannel<? extends StreamConnection>
private final boolean
private volatile int
private static final AtomicIntegerFieldUpdater<UndertowAcceptingSslChannel>

Constructor Summary

AccessConstructor and Description
pack-priv
UndertowAcceptingSslChannel(final UndertowXnioSsl ssl, final AcceptingChannel<? extends StreamConnection> tcpServer, final OptionMap optionMap, final ByteBufferPool applicationBufferPool, final boolean startTls)

Method Summary

Modifier and TypeMethod and Description
public UndertowSslConnection
accept()

Implements org.xnio.channels.AcceptingChannel.accept.

Attempt to accept a connection.

protected UndertowSslConnection
accept(StreamConnection tcpServer, SSLEngine sslEngine)

public void
awaitAcceptable()

Implements org.xnio.channels.SuspendableAcceptChannel.awaitAcceptable.

Block until this channel becomes acceptable again.

public void
awaitAcceptable(final long
the time to wait
time
,
final TimeUnit
the time unit
timeUnit
)

Implements org.xnio.channels.SuspendableAcceptChannel.awaitAcceptable.

Block until this channel becomes acceptable again, or until the timeout expires.

public void
close()

Implements org.xnio.channels.CloseableChannel.close.

Close this channel.

public ChannelListener.Setter<? extends AcceptingChannel<SslConnection>>
getAcceptSetter()

Implements org.xnio.channels.AcceptingChannel.getAcceptSetter.

Get the setter which can be used to change the accept listener for this channel.

public XnioExecutor
getAcceptThread()

Implements org.xnio.channels.SuspendableAcceptChannel.getAcceptThread.

Deprecated

Get an accept thread for this channel.

public ChannelListener.Setter<? extends AcceptingChannel<SslConnection>>
getCloseSetter()

Implements org.xnio.channels.AcceptingChannel.getCloseSetter.

Get the setter which can be used to change the close listener for this channel.

private static String
public XnioIoThread
public SocketAddress
getLocalAddress()

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address that this channel is bound to.

public <A extends SocketAddress> A
getLocalAddress(final Class<A>
the address type class
type
)

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address of a given type, or null if the address is not of that type.

public <T> T
getOption(final Option<T>
the option to get
option
)

Implements org.xnio.channels.Configurable.getOption.

Get the value of a channel option.

public XnioWorker
getWorker()

Implements org.xnio.channels.CloseableChannel.getWorker.

Get the worker for this channel.

public boolean
isAcceptResumed()

Implements org.xnio.channels.SuspendableAcceptChannel.isAcceptResumed.

Determine whether accepts are resumed.

public boolean
isOpen()

Implements java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

public void
public <T> T
setOption(final Option<T>
the option to set
option
,
final T
the value of the option to set
value
)

Implements org.xnio.channels.Configurable.setOption.

Set an option for this channel.

public boolean
supportsOption(final Option<?>
the option
option
)

Implements org.xnio.channels.Configurable.supportsOption.

Determine whether an option is supported on this channel.

public void
suspendAccepts()

Implements org.xnio.channels.SuspendableAcceptChannel.suspendAccepts.

Suspend further read notifications on this channel.

public void
wakeupAccepts()

Implements org.xnio.channels.SuspendableAcceptChannel.wakeupAccepts.

resumeAccepts() Resume accepts} on this channel, and force the accept listener to be triggered even if the channel isn't actually ready.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

acceptSetterback to summary
private final ChannelListener.Setter<AcceptingChannel<SslConnection>> acceptSetter
applicationBufferPoolback to summary
protected final ByteBufferPool applicationBufferPool
cipherSuitesback to summary
private volatile String[] cipherSuites
clientAuthModeback to summary
private volatile SslClientAuthMode clientAuthMode
clientAuthModeUpdaterback to summary
private static final AtomicReferenceFieldUpdater<UndertowAcceptingSslChannel, SslClientAuthMode> clientAuthModeUpdater
Annotations
@SuppressWarnings:rawtypes
closeSetterback to summary
private final ChannelListener.Setter<AcceptingChannel<SslConnection>> closeSetter
enableSessionCreationback to summary
private volatile int enableSessionCreation
enableSessionCreationUpdaterback to summary
private static final AtomicIntegerFieldUpdater<UndertowAcceptingSslChannel> enableSessionCreationUpdater
Annotations
@SuppressWarnings:rawtypes
protocolsback to summary
private volatile String[] protocols
sslback to summary
private final UndertowXnioSsl ssl
startTlsback to summary
protected final boolean startTls
SUPPORTED_OPTIONSback to summary
private static final Set<Option<?>> SUPPORTED_OPTIONS
tcpServerback to summary
private final AcceptingChannel<? extends StreamConnection> tcpServer
useCipherSuitesOrderback to summary
private final boolean useCipherSuitesOrder
useClientModeback to summary
private volatile int useClientMode
useClientModeUpdaterback to summary
private static final AtomicIntegerFieldUpdater<UndertowAcceptingSslChannel> useClientModeUpdater
Annotations
@SuppressWarnings:rawtypes

Constructor Detail

UndertowAcceptingSslChannelback to summary
pack-priv UndertowAcceptingSslChannel(final UndertowXnioSsl ssl, final AcceptingChannel<? extends StreamConnection> tcpServer, final OptionMap optionMap, final ByteBufferPool applicationBufferPool, final boolean startTls)

Method Detail

acceptback to summary
public UndertowSslConnection accept() throws IOException

Implements org.xnio.channels.AcceptingChannel.accept.

Doc from org.xnio.channels.AcceptingChannel.accept.

Attempt to accept a connection.

Returns:UndertowSslConnection

Doc from org.xnio.channels.SimpleAcceptingChannel.accept.

the new connection, or null if none is available

Exceptions
IOException:

Doc from org.xnio.channels.SimpleAcceptingChannel.accept.

if an I/O error occurs

acceptback to summary
protected UndertowSslConnection accept(StreamConnection tcpServer, SSLEngine sslEngine) throws IOException
awaitAcceptableback to summary
public void awaitAcceptable() throws IOException

Implements org.xnio.channels.SuspendableAcceptChannel.awaitAcceptable.

Doc from org.xnio.channels.SuspendableAcceptChannel.awaitAcceptable.

Block until this channel becomes acceptable again. This method may return spuriously before the channel becomes acceptable.

Exceptions
IOException:
if an I/O error occurs
awaitAcceptableback to summary
public void awaitAcceptable(final long time, final TimeUnit timeUnit) throws IOException

Implements org.xnio.channels.SuspendableAcceptChannel.awaitAcceptable.

Doc from org.xnio.channels.SuspendableAcceptChannel.awaitAcceptable.

Block until this channel becomes acceptable again, or until the timeout expires. This method may return spuriously before the channel becomes acceptable or the timeout expires.

Parameters
time:long

the time to wait

timeUnit:TimeUnit

the time unit

Exceptions
IOException:
if an I/O error occurs
closeback to summary
public void close() throws IOException

Implements org.xnio.channels.CloseableChannel.close.

Doc from org.xnio.channels.CloseableChannel.close.

Close this channel. When a channel is closed, its close listener is invoked. Invoking this method more than once has no additional effect.

Exceptions
IOException:
if the close failed
getAcceptSetterback to summary
public ChannelListener.Setter<? extends AcceptingChannel<SslConnection>> getAcceptSetter()

Implements org.xnio.channels.AcceptingChannel.getAcceptSetter.

Doc from org.xnio.channels.AcceptingChannel.getAcceptSetter.

Get the setter which can be used to change the accept listener for this channel.

Returns:ChannelListener.Setter<? extends AcceptingChannel<SslConnection>>

Doc from org.xnio.channels.SuspendableAcceptChannel.getAcceptSetter.

the setter

getAcceptThreadback to summary
public XnioExecutor getAcceptThread()

Implements org.xnio.channels.SuspendableAcceptChannel.getAcceptThread.

Doc from org.xnio.channels.SuspendableAcceptChannel.getAcceptThread.

Deprecated

Get an accept thread for this channel. If more than one is configured, any of them may be returned.

Returns:XnioExecutor

the thread

Annotations
@Deprecated
getCloseSetterback to summary
public ChannelListener.Setter<? extends AcceptingChannel<SslConnection>> getCloseSetter()

Implements org.xnio.channels.AcceptingChannel.getCloseSetter.

Doc from org.xnio.channels.AcceptingChannel.getCloseSetter.

Get the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.

Returns:ChannelListener.Setter<? extends AcceptingChannel<SslConnection>>

Doc from org.xnio.channels.CloseableChannel.getCloseSetter.

the setter

getHostNameNoResolveback to summary
private static String getHostNameNoResolve(InetSocketAddress socketAddress)
getIoThreadback to summary
public XnioIoThread getIoThread()

Implements org.xnio.channels.CloseableChannel.getIoThread, org.xnio.channels.SuspendableAcceptChannel.getIoThread.

Doc from org.xnio.channels.CloseableChannel.getIoThread.

Get the I/O thread associated with this channel.

Returns:XnioIoThread

the I/O thread associated with this channel

getLocalAddressback to summary
public SocketAddress getLocalAddress()

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Doc from org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address that this channel is bound to.

Returns:SocketAddress

the local address

getLocalAddressback to summary
public <A extends SocketAddress> A getLocalAddress(final Class<A> type)

Implements org.xnio.channels.BoundChannel.getLocalAddress.

Doc from org.xnio.channels.BoundChannel.getLocalAddress.

Get the local address of a given type, or null if the address is not of that type.

Parameters
<A>
the address type
type:Class<A>

the address type class

Returns:A

the local address, or null if unknown

getOptionback to summary
public <T> T getOption(final Option<T> option) throws IOException

Implements org.xnio.channels.Configurable.getOption.

Doc from org.xnio.channels.Configurable.getOption.

Get the value of a channel option.

Parameters
<T>
the type of the option value
option:Option<T>

the option to get

Returns:T

the value of the option, or null if it is not set

Exceptions
IOException:
if an I/O error occurred when reading the option
getWorkerback to summary
public XnioWorker getWorker()

Implements org.xnio.channels.CloseableChannel.getWorker.

Doc from org.xnio.channels.CloseableChannel.getWorker.

Get the worker for this channel.

Returns:XnioWorker

the worker

isAcceptResumedback to summary
public boolean isAcceptResumed()

Implements org.xnio.channels.SuspendableAcceptChannel.isAcceptResumed.

Doc from org.xnio.channels.SuspendableAcceptChannel.isAcceptResumed.

Determine whether accepts are resumed.

Returns:boolean

true if accepts are resumed, false if accepts are suspended

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Implements java.nio.channels.Channel.isOpen.

Doc from java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

Returns:boolean

true if, and only if, this channel is open

resumeAcceptsback to summary
public void resumeAccepts()

Implements org.xnio.channels.SuspendableAcceptChannel.resumeAccepts.

Doc from org.xnio.channels.SuspendableAcceptChannel.resumeAccepts.

Resume reads on this channel. The accept listener will be called as soon as there is a connection available to be accepted.

setOptionback to summary
public <T> T setOption(final Option<T> option, final T value) throws IllegalArgumentException, IOException

Implements org.xnio.channels.Configurable.setOption.

Doc from org.xnio.channels.Configurable.setOption.

Set an option for this channel. Unsupported options are ignored.

Parameters
<T>
the type of the option value
option:Option<T>

the option to set

value:T

the value of the option to set

Returns:T

the previous option value, if any

Exceptions
IllegalArgumentException:
if the value is not acceptable for this option
IOException:
if an I/O error occurred when modifying the option
supportsOptionback to summary
public boolean supportsOption(final Option<?> option)

Implements org.xnio.channels.Configurable.supportsOption.

Doc from org.xnio.channels.Configurable.supportsOption.

Determine whether an option is supported on this channel.

Parameters
option:Option<?>

the option

Returns:boolean

true if it is supported

suspendAcceptsback to summary
public void suspendAccepts()

Implements org.xnio.channels.SuspendableAcceptChannel.suspendAccepts.

Doc from org.xnio.channels.SuspendableAcceptChannel.suspendAccepts.

Suspend further read notifications on this channel.

wakeupAcceptsback to summary
public void wakeupAccepts()

Implements org.xnio.channels.SuspendableAcceptChannel.wakeupAccepts.

Doc from org.xnio.channels.SuspendableAcceptChannel.wakeupAccepts.

resumeAccepts() Resume accepts} on this channel, and force the accept listener to be triggered even if the channel isn't actually ready.