org.eclipse.jetty.websocket
Class WebSocketGeneratorD7_9

java.lang.Object
  extended by org.eclipse.jetty.websocket.WebSocketGeneratorD7_9
All Implemented Interfaces:
WebSocketGenerator

public class WebSocketGeneratorD7_9
extends Object
implements WebSocketGenerator

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.


Nested Class Summary
static class WebSocketGeneratorD7_9.FixedMaskGen
           
static interface WebSocketGeneratorD7_9.MaskGen
           
static class WebSocketGeneratorD7_9.NullMaskGen
           
static class WebSocketGeneratorD7_9.RandomMaskGen
           
 
Constructor Summary
WebSocketGeneratorD7_9(WebSocketBuffers buffers, EndPoint endp)
           
WebSocketGeneratorD7_9(WebSocketBuffers buffers, EndPoint endp, WebSocketGeneratorD7_9.MaskGen maskGen)
           
 
Method Summary
 void addFrame(byte flags, byte opcode, byte[] content, int offset, int length)
           
 int flush()
           
 int flushBuffer()
           
 void idle()
           
 boolean isBufferEmpty()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebSocketGeneratorD7_9

public WebSocketGeneratorD7_9(WebSocketBuffers buffers,
                              EndPoint endp)

WebSocketGeneratorD7_9

public WebSocketGeneratorD7_9(WebSocketBuffers buffers,
                              EndPoint endp,
                              WebSocketGeneratorD7_9.MaskGen maskGen)
Method Detail

addFrame

public void addFrame(byte flags,
                     byte opcode,
                     byte[] content,
                     int offset,
                     int length)
              throws IOException
Specified by:
addFrame in interface WebSocketGenerator
Throws:
IOException

flushBuffer

public int flushBuffer()
                throws IOException
Throws:
IOException

flush

public int flush()
          throws IOException
Specified by:
flush in interface WebSocketGenerator
Throws:
IOException

isBufferEmpty

public boolean isBufferEmpty()
Specified by:
isBufferEmpty in interface WebSocketGenerator

idle

public void idle()


Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.