|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.remote.websocket.WebSocketContextStreamImpl
public class WebSocketContextStreamImpl
User facade for http requests.
| 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 | |
|---|---|
WebSocketContextStreamImpl(WriteStream out)
|
|
| 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. |
protected WebSocketInputStream |
createWebSocketInputStream(FrameInputStream is)
|
void |
disconnect()
Disconnect the connection. |
long |
getTimeout()
Gets the read timeout. |
protected WriteStream |
getWriteStream()
|
void |
pong(byte[] bytes)
sends a pong message |
void |
setTimeout(long timeout)
Sets the read timeout. |
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 WebSocketContextStreamImpl(WriteStream out)
| Method Detail |
|---|
public void setTimeout(long timeout)
WebSocketContext
setTimeout in interface WebSocketContextpublic long getTimeout()
WebSocketContext
getTimeout in interface WebSocketContext
public java.io.OutputStream startBinaryMessage()
throws java.io.IOException
WebSocketContext
startBinaryMessage in interface WebSocketContextjava.io.IOException
public java.io.PrintWriter startTextMessage()
throws java.io.IOException
WebSocketContext
startTextMessage in interface WebSocketContextjava.io.IOExceptionpublic void pong(byte[] bytes)
WebSocketContext
pong in interface WebSocketContextpublic void close()
WebSocketContext
close in interface WebSocketContext
public void close(int code,
java.lang.String msg)
WebSocketContext
close in interface WebSocketContextprotected WriteStream getWriteStream()
public void disconnect()
WebSocketContext
disconnect in interface WebSocketContext
protected WebSocketInputStream createWebSocketInputStream(FrameInputStream is)
throws java.io.IOException
java.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 | |||||||||