org.eclipse.jetty.websocket
Class WebSocketGenerator
java.lang.Object
org.eclipse.jetty.websocket.WebSocketGenerator
public class WebSocketGenerator
- extends Object
WebSocketGenerator.
This class generates websocket packets.
It is fully synchronized because it is likely that async
threads will call the addMessage methods while other
threads are flushing the generator.
Method Summary |
void |
addFrame(byte frame,
byte[] content,
int blockFor)
|
void |
addFrame(byte frame,
byte[] content,
int offset,
int length,
int blockFor)
|
void |
addFrame(byte frame,
String content,
int blockFor)
|
int |
flush()
|
int |
flush(long blockFor)
|
boolean |
isBufferEmpty()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebSocketGenerator
public WebSocketGenerator(WebSocketBuffers buffers,
EndPoint endp)
addFrame
public void addFrame(byte frame,
byte[] content,
int blockFor)
throws IOException
- Throws:
IOException
addFrame
public void addFrame(byte frame,
byte[] content,
int offset,
int length,
int blockFor)
throws IOException
- Throws:
IOException
addFrame
public void addFrame(byte frame,
String content,
int blockFor)
throws IOException
- Throws:
IOException
flush
public int flush(long blockFor)
throws IOException
- Throws:
IOException
flush
public int flush()
throws IOException
- Throws:
IOException
isBufferEmpty
public boolean isBufferEmpty()
Copyright © 1995-2010 Mort Bay Consulting. All Rights Reserved.