public class WebSocketClientSelectorManager extends SelectorManager
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.ListenerDEFAULT_CONNECT_TIMEOUT| Constructor and Description |
|---|
WebSocketClientSelectorManager(WebSocketClient client) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
connectionFailed(SelectableChannel channel,
Throwable ex,
Object attachment)
Callback method invoked when a non-blocking connect cannot be completed.
|
WebSocketPolicy |
getPolicy() |
SslContextFactory |
getSslContextFactory() |
Connection |
newConnection(SelectableChannel channel,
EndPoint endPoint,
Object attachment)
Factory method to create
Connection. |
protected EndPoint |
newEndPoint(SelectableChannel channel,
ManagedSelector selector,
SelectionKey selectionKey)
Factory method to create
EndPoint. |
SSLEngine |
newSSLEngine(SslContextFactory sslContextFactory,
SelectableChannel channel) |
UpgradeConnection |
newUpgradeConnection(SelectableChannel channel,
EndPoint endPoint,
ConnectPromise connectPromise) |
void |
setSslContextFactory(SslContextFactory sslContextFactory) |
accept, accept, accepted, acceptor, connect, connectionClosed, connectionOpened, doAccept, doFinishConnect, doStart, doStop, endPointClosed, endPointOpened, execute, getConnectTimeout, getExecutor, getScheduler, getSelectorCount, isConnectionPending, newSelector, newSelector, setConnectTimeoutaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic WebSocketClientSelectorManager(WebSocketClient client)
protected void connectionFailed(SelectableChannel channel, Throwable ex, Object attachment)
SelectorManagerCallback method invoked when a non-blocking connect cannot be completed.
By default it just logs with level warning.
connectionFailed in class SelectorManagerchannel - the channel that attempted the connectex - the exception that caused the connect to failattachment - the attachment object associated at registrationpublic SslContextFactory getSslContextFactory()
public Connection newConnection(SelectableChannel channel, EndPoint endPoint, Object attachment) throws IOException
SelectorManagerFactory method to create Connection.
newConnection in class SelectorManagerchannel - the channel associated to the connectionendPoint - the endpointattachment - the attachmentIOException - if unable to create new connectionprotected EndPoint newEndPoint(SelectableChannel channel, ManagedSelector selector, SelectionKey selectionKey) throws IOException
SelectorManagerFactory method to create EndPoint.
This method is invoked as a result of the registration of a channel via SelectorManager.connect(SelectableChannel, Object)
or SelectorManager.accept(SelectableChannel).
newEndPoint in class SelectorManagerchannel - the channel associated to the endpointselector - the selector the channel is registered toselectionKey - the selection keyIOException - if the endPoint cannot be createdSelectorManager.newConnection(SelectableChannel, EndPoint, Object)public SSLEngine newSSLEngine(SslContextFactory sslContextFactory, SelectableChannel channel)
public UpgradeConnection newUpgradeConnection(SelectableChannel channel, EndPoint endPoint, ConnectPromise connectPromise)
public void setSslContextFactory(SslContextFactory sslContextFactory)
public WebSocketPolicy getPolicy()
Copyright © 1995–2016 Mort Bay Consulting. All rights reserved.