Top Inners Fields Constructors Methods
org.apache.sshd.common.io.nio2

public Class Nio2Acceptor

extends Nio2Service
implements IoAcceptor
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.io.IoAcceptor, org.apache.sshd.common.io.IoService, org.apache.sshd.common.io.IoServiceEventListenerManager, org.apache.sshd.common.Closeable, java.nio.channels.Channel, java.io.Closeable, java.lang.AutoCloseable
Imports
java.io.IOException, java.net.SocketAddress, java.nio.channels.AsynchronousChannelGroup, .AsynchronousServerSocketChannel, .AsynchronousSocketChannel, .ClosedChannelException, .CompletionHandler, java.util.ArrayList, .Collection, .Collections, .HashSet, .Map, .Objects, .Set, java.util.concurrent.ConcurrentHashMap, .ExecutorService, org.apache.sshd.common.Closeable, .PropertyResolver, org.apache.sshd.common.io.IoAcceptor, .IoHandler, .IoServiceEventListener, org.apache.sshd.common.util.GenericUtils, .ValidateUtils, org.apache.sshd.common.util.io.IoUtils, org.apache.sshd.core.CoreModuleProperties

Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
private int
protected final Map<SocketAddress, AsynchronousServerSocketChannel>
private final Nio2ServiceFactory
Inherited from org.apache.sshd.common.io.nio2.Nio2Service:
CONFIGURABLE_OPTIONSdisposingpropertyResolversessions

Constructor Summary

AccessConstructor and Description
public
Nio2Acceptor(Nio2ServiceFactory nio2ServiceFactory, PropertyResolver propertyResolver, IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks)

Method Summary

Modifier and TypeMethod and Description
public void
public void
protected void
protected CompletionHandler<AsynchronousSocketChannel, ? super SocketAddress>
public Set<SocketAddress>
protected Closeable
protected AsynchronousServerSocketChannel
protected void
preClose()

Overrides org.apache.sshd.common.util.closeable.AbstractCloseable.preClose.

preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately.

protected Closeable
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
public void
public void
Inherited from org.apache.sshd.common.io.nio2.Nio2Service:
disposegetChannelGroupgetExecutorServicegetIoHandlergetIoServiceEventListenergetManagedSessionssessionClosedsetIoServiceEventListenersetOptionsetSocketOptionsunmapSession

Field Detail

backlogback to summary
private int backlog
channelsback to summary
protected final Map<SocketAddress, AsynchronousServerSocketChannel> channels
nio2ServiceFactoryback to summary
private final Nio2ServiceFactory nio2ServiceFactory

Constructor Detail

Nio2Acceptorback to summary
public Nio2Acceptor(Nio2ServiceFactory nio2ServiceFactory, PropertyResolver propertyResolver, IoHandler handler, AsynchronousChannelGroup group, ExecutorService resumeTasks)

Method Detail

bindback to summary
public void bind(Collection<? extends SocketAddress> addresses) throws IOException

Implements org.apache.sshd.common.io.IoAcceptor.bind.

Annotations
@Override
bindback to summary
public void bind(SocketAddress address) throws IOException

Implements org.apache.sshd.common.io.IoAcceptor.bind.

Annotations
@Override
closeImmediately0back to summary
protected void closeImmediately0()
createSocketCompletionHandlerback to summary
protected CompletionHandler<AsynchronousSocketChannel, ? super SocketAddress> createSocketCompletionHandler(Map<SocketAddress, AsynchronousServerSocketChannel> channelsMap, AsynchronousServerSocketChannel socket) throws IOException
getBoundAddressesback to summary
public Set<SocketAddress> getBoundAddresses()

Implements org.apache.sshd.common.io.IoAcceptor.getBoundAddresses.

Annotations
@Override
getInnerCloseableback to summary
protected Closeable getInnerCloseable()

Overrides org.apache.sshd.common.io.nio2.Nio2Service.getInnerCloseable.

Annotations
@Override
openAsynchronousServerSocketChannelback to summary
protected AsynchronousServerSocketChannel openAsynchronousServerSocketChannel(SocketAddress address, AsynchronousChannelGroup group) throws IOException
preCloseback to summary
protected void preClose()

Overrides org.apache.sshd.common.util.closeable.AbstractCloseable.preClose.

Doc from org.apache.sshd.common.util.closeable.AbstractCloseable.preClose.

preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately. When preClose() is called, isClosing() == true

Annotations
@Override
protectInProgressBindingback to summary
protected Closeable protectInProgressBinding(SocketAddress address, AsynchronousServerSocketChannel asyncChannel)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
unbindback to summary
public void unbind()

Implements org.apache.sshd.common.io.IoAcceptor.unbind.

Annotations
@Override
unbindback to summary
public void unbind(Collection<? extends SocketAddress> addresses)

Implements org.apache.sshd.common.io.IoAcceptor.unbind.

Annotations
@Override
unbindback to summary
public void unbind(SocketAddress address)

Implements org.apache.sshd.common.io.IoAcceptor.unbind.

Annotations
@Override
org.apache.sshd.common.io.nio2 back to summary

protected Class Nio2Acceptor.AcceptCompletionHandler

extends Nio2CompletionHandler<AsynchronousSocketChannel, SocketAddress>
Class Inheritance
Annotations
@SuppressWarnings:synthetic-access

Field Summary

Modifier and TypeField and Description
protected final AsynchronousServerSocketChannel

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected Nio2Session
protected boolean
protected void
protected void
Inherited from org.apache.sshd.common.io.nio2.Nio2CompletionHandler:
completedfailed

Field Detail

socketback to summary
protected final AsynchronousServerSocketChannel socket

Constructor Detail

AcceptCompletionHandlerback to summary
pack-priv AcceptCompletionHandler(AsynchronousServerSocketChannel socket)

Method Detail

createSessionback to summary
protected Nio2Session createSession(Nio2Acceptor acceptor, SocketAddress address, AsynchronousSocketChannel channel, IoHandler handler) throws Throwable
okToReacceptback to summary
protected boolean okToReaccept(Throwable exc, SocketAddress address)
onCompletedback to summary
protected void onCompleted(AsynchronousSocketChannel result, SocketAddress address)

Implements abstract org.apache.sshd.common.io.nio2.Nio2CompletionHandler.onCompleted.

Annotations
@Override
onFailedback to summary
protected void onFailed(Throwable exc, SocketAddress address)

Implements abstract org.apache.sshd.common.io.nio2.Nio2CompletionHandler.onFailed.

Annotations
@Override