public class WebSocketClientSelectorManager extends SelectorManager
SelectorManager.ManagedSelector, SelectorManager.SelectableEndPoint
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Constructor and Description |
---|
WebSocketClientSelectorManager(ByteBufferPool bufferPool,
Executor executor,
Scheduler scheduler,
WebSocketPolicy policy) |
Modifier and Type | Method and Description |
---|---|
SslContextFactory |
getSslContextFactory() |
Connection |
newConnection(SocketChannel channel,
EndPoint endPoint,
Object attachment)
Factory method to create
Connection . |
protected EndPoint |
newEndPoint(SocketChannel channel,
SelectorManager.ManagedSelector selectSet,
SelectionKey selectionKey)
Factory method to create
EndPoint . |
SSLEngine |
newSSLEngine(SslContextFactory sslContextFactory,
SocketChannel channel) |
UpgradeConnection |
newUpgradeConnection(SocketChannel channel,
EndPoint endPoint,
DefaultWebSocketClient client) |
void |
setSslContextFactory(SslContextFactory sslContextFactory) |
accept, connect, connectionClosed, connectionFailed, connectionOpened, doStart, doStop, dump, dump, endPointClosed, endPointOpened, execute, finishConnect, getConnectTimeout, getExecutor, getScheduler, getSelectorCount, newSelector, setConnectTimeout
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
public WebSocketClientSelectorManager(ByteBufferPool bufferPool, Executor executor, Scheduler scheduler, WebSocketPolicy policy)
public SslContextFactory getSslContextFactory()
public Connection newConnection(SocketChannel channel, EndPoint endPoint, Object attachment) throws IOException
SelectorManager
Factory method to create Connection
.
newConnection
in class SelectorManager
channel
- the channel associated to the connectionendPoint
- the endpointattachment
- the attachmentIOException
SelectorManager.newEndPoint(SocketChannel, ManagedSelector, SelectionKey)
protected EndPoint newEndPoint(SocketChannel channel, SelectorManager.ManagedSelector selectSet, SelectionKey selectionKey) throws IOException
SelectorManager
Factory method to create EndPoint
.
This method is invoked as a result of the registration of a channel via SelectorManager.connect(SocketChannel, Object)
or SelectorManager.accept(SocketChannel)
.
newEndPoint
in class SelectorManager
channel
- the channel associated to the endpointselectSet
- the selector the channel is registered toselectionKey
- the selection keyIOException
- if the endPoint cannot be createdSelectorManager.newConnection(SocketChannel, EndPoint, Object)
public SSLEngine newSSLEngine(SslContextFactory sslContextFactory, SocketChannel channel)
public UpgradeConnection newUpgradeConnection(SocketChannel channel, EndPoint endPoint, DefaultWebSocketClient client)
public void setSslContextFactory(SslContextFactory sslContextFactory)
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.