Top Description Fields Constructors Methods
org.xnio.ssl

pack-priv abstract Class AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>

extends Object
implements AcceptingChannel<C extends ConnectedChannel>
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
Known Direct Subclasses
org.xnio.ssl.JsseAcceptingSslStreamConnection
Static Imports
org.xnio._private.Messages.msg

Abstract Accepting SSL channel.
Authors
David M. Lloyd, Flavia Rainone

Field Summary

Modifier and TypeField and Description
private final ChannelListener.Setter<AcceptingChannel<C>>
protected final Pool<ByteBuffer>
applicationBufferPool

References Deprecated Pool is deprecated or references (maybe indirectly) at least one deprecated element.
private volatile String[]
private static final AtomicReferenceFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>, String[]>
private volatile SslClientAuthMode
private static final AtomicReferenceFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>, SslClientAuthMode>
private final ChannelListener.Setter<AcceptingChannel<C>>
private volatile int
private static final AtomicIntegerFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>>
private volatile String[]
private static final AtomicReferenceFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>, String[]>
protected final Pool<ByteBuffer>
socketBufferPool

References Deprecated Pool is deprecated or references (maybe indirectly) at least one deprecated element.
private final SSLContext
protected final boolean
private static final Set<Option<?>>
private final AcceptingChannel<? extends S>
private volatile int
private static final AtomicIntegerFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>>

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractAcceptingSslChannel(final SSLContext sslContext, final AcceptingChannel<? extends S> tcpServer, final OptionMap optionMap, final Pool<ByteBuffer> socketBufferPool, final Pool<ByteBuffer> applicationBufferPool, final boolean startTls)
References Deprecated Pool is deprecated or references (maybe indirectly) at least one deprecated element.

Method Summary

Modifier and TypeMethod and Description
public C
accept()

Implements org.xnio.channels.AcceptingChannel.accept.

Attempt to accept a connection.

protected abstract C
accept(S 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<C>>
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<C>>
getCloseSetter()

Implements org.xnio.channels.AcceptingChannel.getCloseSetter.

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

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<C>> acceptSetter
applicationBufferPoolback to summary
protected final Pool<ByteBuffer> applicationBufferPool

References Deprecated

Pool is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

cipherSuitesback to summary
private volatile String[] cipherSuites
cipherSuitesUpdaterback to summary
private static final AtomicReferenceFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>, String[]> cipherSuitesUpdater
Annotations
@SuppressWarnings:rawtypes
clientAuthModeback to summary
private volatile SslClientAuthMode clientAuthMode
clientAuthModeUpdaterback to summary
private static final AtomicReferenceFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>, SslClientAuthMode> clientAuthModeUpdater
Annotations
@SuppressWarnings:rawtypes
closeSetterback to summary
private final ChannelListener.Setter<AcceptingChannel<C>> closeSetter
enableSessionCreationback to summary
private volatile int enableSessionCreation
enableSessionCreationUpdaterback to summary
private static final AtomicIntegerFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>> enableSessionCreationUpdater
Annotations
@SuppressWarnings:rawtypes
protocolsback to summary
private volatile String[] protocols
protocolsUpdaterback to summary
private static final AtomicReferenceFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>, String[]> protocolsUpdater
Annotations
@SuppressWarnings:rawtypes
socketBufferPoolback to summary
protected final Pool<ByteBuffer> socketBufferPool

References Deprecated

Pool is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

sslContextback to summary
private final SSLContext sslContext
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 S> tcpServer
useClientModeback to summary
private volatile int useClientMode
useClientModeUpdaterback to summary
private static final AtomicIntegerFieldUpdater<AbstractAcceptingSslChannel<C extends ConnectedChannel, S extends ConnectedChannel>> useClientModeUpdater
Annotations
@SuppressWarnings:rawtypes

Constructor Detail

AbstractAcceptingSslChannelback to summary
pack-priv AbstractAcceptingSslChannel(final SSLContext sslContext, final AcceptingChannel<? extends S> tcpServer, final OptionMap optionMap, final Pool<ByteBuffer> socketBufferPool, final Pool<ByteBuffer> applicationBufferPool, final boolean startTls)

References Deprecated

Pool is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Method Detail

acceptback to summary
public C accept() throws IOException

Implements org.xnio.channels.AcceptingChannel.accept.

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

Attempt to accept a connection.

Returns:C

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 abstract C accept(S 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<C>> 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<C>>

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<C>> 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<C>>

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

the setter

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.