public interface BaseConnection
Modifier and Type | Interface and Description |
---|---|
static class |
BaseConnection.State |
static interface |
BaseConnection.SuspendToken
Connection suspend token
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Send a websocket Close frame,
StatusCode.NORMAL , without a reason. |
void |
close(int statusCode,
String reason)
Send a websocket Close frame, with status code.
|
void |
disconnect()
Terminate the connection (no close frame sent)
|
InetSocketAddress |
getRemoteAddress()
Get the remote Address in use for this connection.
|
BaseConnection.State |
getState()
Get the state of the connection.
|
boolean |
isOpen()
Simple test to see if connection is open (and not closed)
|
boolean |
isReading()
Tests if the connection is actively reading.
|
void |
notifyClosing()
Notify that the connection has entered the closing handshake
|
BaseConnection.SuspendToken |
suspend()
Suspend a the incoming read events on the connection.
|
void close()
StatusCode.NORMAL
, without a reason.
Basic usage: results in an non-blocking async write, then connection close.
StatusCode
,
close(int, String)
void close(int statusCode, String reason)
Advanced usage: results in an non-blocking async write, then connection close.
statusCode
- the status codereason
- the (optional) reason. (can be null for no reason)StatusCode
void disconnect()
InetSocketAddress getRemoteAddress()
BaseConnection.State getState()
boolean isOpen()
boolean isReading()
void notifyClosing()
BaseConnection.SuspendToken suspend()
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.