public class WebSocketClient extends ContainerLifeCycle
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Constructor and Description |
|---|
WebSocketClient() |
WebSocketClient(SslContextFactory sslContextFactory) |
| Modifier and Type | Method and Description |
|---|---|
Future<Session> |
connect(Object websocket,
URI toUri) |
Future<Session> |
connect(Object websocket,
URI toUri,
ClientUpgradeRequest request) |
protected void |
doStart()
Starts the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
SocketAddress |
getBindAddress() |
ByteBufferPool |
getBufferPool() |
ConnectionManager |
getConnectionManager() |
long |
getConnectTimeout() |
CookieStore |
getCookieStore() |
Executor |
getExecutor() |
ExtensionFactory |
getExtensionFactory() |
Masker |
getMasker() |
long |
getMaxIdleTimeout()
Get the max idle timeout for new connections.
|
WebSocketPolicy |
getPolicy() |
Scheduler |
getScheduler() |
SslContextFactory |
getSslContextFactory() |
List<Extension> |
initExtensions(List<ExtensionConfig> requested) |
protected ConnectionManager |
newConnectionManager()
Factory method for new ConnectionManager (used by other projects like cometd)
|
void |
setBindAdddress(SocketAddress bindAddress) |
void |
setBufferPool(ByteBufferPool bufferPool) |
void |
setConnectTimeout(long timeoutMilliseconds)
Set the timeout for connecting to the remote server.
|
void |
setCookieStore(CookieStore cookieStore) |
void |
setExecutor(Executor executor) |
void |
setMasker(Masker masker) |
void |
setMaxIdleTimeout(long milliseconds)
Set the max idle timeout for new connections.
|
addBean, addBean, addBean, contains, destroy, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, setBeans, setStopTimeout, start, unmanage, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic WebSocketClient()
public WebSocketClient(SslContextFactory sslContextFactory)
public Future<Session> connect(Object websocket, URI toUri) throws IOException
IOExceptionpublic Future<Session> connect(Object websocket, URI toUri, ClientUpgradeRequest request) throws IOException
IOExceptionprotected void doStart()
throws Exception
ContainerLifeCycledoStart in class ContainerLifeCycleExceptionprotected void doStop()
throws Exception
ContainerLifeCycledoStop in class ContainerLifeCycleExceptionpublic SocketAddress getBindAddress()
public ByteBufferPool getBufferPool()
public ConnectionManager getConnectionManager()
public long getConnectTimeout()
public CookieStore getCookieStore()
public Executor getExecutor()
public ExtensionFactory getExtensionFactory()
public Masker getMasker()
public long getMaxIdleTimeout()
public WebSocketPolicy getPolicy()
public Scheduler getScheduler()
public SslContextFactory getSslContextFactory()
SslContextFactory that manages TLS encryptionWebSocketClient(SslContextFactory)public List<Extension> initExtensions(List<ExtensionConfig> requested)
protected ConnectionManager newConnectionManager()
public void setBindAdddress(SocketAddress bindAddress)
public void setBufferPool(ByteBufferPool bufferPool)
public void setConnectTimeout(long timeoutMilliseconds)
timeoutMilliseconds - the timeout in millisecondspublic void setCookieStore(CookieStore cookieStore)
public void setExecutor(Executor executor)
public void setMasker(Masker masker)
public void setMaxIdleTimeout(long milliseconds)
Existing connections will not have their max idle timeout adjusted.
milliseconds - the timeout in millisecondsCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.