@Override public boolean isRunning() { return this.client.isStarted(); }
@Override public boolean isRunning() { return this.client.isStarted(); }
@Override public boolean isRunning() { return this.client.isStarted(); }
/** * Set JVM shutdown behavior. * @param stop If true, this client instance will be explicitly stopped when the * JVM is shutdown. Otherwise the application is responsible for maintaining the WebSocketClient lifecycle. * @see Runtime#addShutdownHook(Thread) * @see ShutdownThread */ public synchronized void setStopAtShutdown(boolean stop) { if (stop) { if (!stopAtShutdown && isStarted() && !ShutdownThread.isRegistered(this)) ShutdownThread.register(this); } else ShutdownThread.deregister(this); stopAtShutdown = stop; }
public Future<Session> connect(Object websocket, URI toUri, ClientUpgradeRequest request) throws IOException if (!isStarted())
public Future<Session> connect(Object websocket, URI toUri, ClientUpgradeRequest request) throws IOException if (!isStarted())
if (client.isStarted() == false) { client.start();