org.glassfish.grizzly.websockets
Class DataFrame

java.lang.Object
  extended by org.glassfish.grizzly.websockets.DataFrame
Direct Known Subclasses:
ClosingFrame

public class DataFrame
extends Object

In memory representation of a websocket frame.

See Also:
Frame Definition

Constructor Summary
DataFrame(FrameType type)
           
DataFrame(FrameType type, byte[] data)
           
DataFrame(FrameType type, byte[] data, boolean fin)
           
DataFrame(FrameType type, String data)
           
DataFrame(FrameType type, String data, boolean fin)
           
 
Method Summary
 byte[] getBytes()
           
 String getTextPayload()
           
 FrameType getType()
           
 boolean isLast()
           
 void respond(WebSocket socket)
           
 void setLast(boolean last)
           
 void setPayload(byte[] bytes)
           
 void setPayload(String payload)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataFrame

public DataFrame(FrameType type)

DataFrame

public DataFrame(FrameType type,
                 String data)

DataFrame

public DataFrame(FrameType type,
                 String data,
                 boolean fin)

DataFrame

public DataFrame(FrameType type,
                 byte[] data)

DataFrame

public DataFrame(FrameType type,
                 byte[] data,
                 boolean fin)
Method Detail

getType

public FrameType getType()

getTextPayload

public String getTextPayload()

setPayload

public final void setPayload(String payload)

setPayload

public void setPayload(byte[] bytes)

getBytes

public byte[] getBytes()

respond

public void respond(WebSocket socket)

toString

public String toString()
Overrides:
toString in class Object

isLast

public boolean isLast()

setLast

public void setLast(boolean last)


Copyright © 2013 Oracle Corporation. All Rights Reserved.