|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.remote.websocket.WebSocketClient
public class WebSocketClient
WebSocketClient
| Field Summary |
|---|
| Fields inherited from interface com.caucho.remote.websocket.WebSocketConstants |
|---|
CLOSE_ERROR, CLOSE_MESSAGE_TOO_BIG, CLOSE_OK, CLOSE_UTF8, FLAG_FIN, FLAG_MASK, MASK_OPCODE, OP_BINARY, OP_CLOSE, OP_CONT, OP_PING, OP_PONG, OP_TEXT, VERSION |
| Constructor Summary | |
|---|---|
WebSocketClient(java.lang.String url,
WebSocketListener listener)
|
|
| Method Summary | |
|---|---|
void |
close()
gracefully close the connection, waiting for unread messages. |
void |
close(int code,
java.lang.String msg)
gracefully close the connection, waiting for unread messages. |
void |
connect()
|
void |
connect(java.lang.String userName,
java.lang.String password)
|
protected void |
connectImpl(java.lang.String userName,
java.lang.String password)
|
void |
disconnect()
Disconnect the connection. |
java.io.InputStream |
getInputStream()
|
long |
getTimeout()
Gets the read timeout. |
boolean |
isClosed()
|
protected void |
parseHeaders(ReadStream in)
|
void |
pong(byte[] message)
sends a pong message |
void |
setMasked(boolean isMasked)
|
void |
setTimeout(long timeout)
Sets the read timeout. |
void |
setVirtualHost(java.lang.String virtualHost)
|
java.io.OutputStream |
startBinaryMessage()
Returns the output stream for a binary message. |
java.io.PrintWriter |
startTextMessage()
Returns the output stream for a binary message. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WebSocketClient(java.lang.String url,
WebSocketListener listener)
| Method Detail |
|---|
public void setVirtualHost(java.lang.String virtualHost)
public void setMasked(boolean isMasked)
public void connect()
throws java.io.IOException
java.io.IOException
public void connect(java.lang.String userName,
java.lang.String password)
throws java.io.IOException
java.io.IOException
protected void connectImpl(java.lang.String userName,
java.lang.String password)
throws java.io.IOException
java.io.IOException
protected void parseHeaders(ReadStream in)
throws java.io.IOException
java.io.IOExceptionpublic void disconnect()
WebSocketContext
disconnect in interface WebSocketContextpublic boolean isClosed()
public void close()
WebSocketContext
close in interface WebSocketContext
public void close(int code,
java.lang.String msg)
WebSocketContext
close in interface WebSocketContextpublic java.io.InputStream getInputStream()
public java.io.OutputStream startBinaryMessage()
throws java.io.IOException
WebSocketContext
startBinaryMessage in interface WebSocketContextjava.io.IOExceptionpublic java.io.PrintWriter startTextMessage()
WebSocketContext
startTextMessage in interface WebSocketContextpublic long getTimeout()
WebSocketContext
getTimeout in interface WebSocketContextpublic void setTimeout(long timeout)
WebSocketContext
setTimeout in interface WebSocketContext
public void pong(byte[] message)
throws java.io.IOException
WebSocketContext
pong in interface WebSocketContextjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||