org.java_websocket.drafts
Class Draft_76

java.lang.Object
  extended by org.java_websocket.drafts.Draft
      extended by org.java_websocket.drafts.Draft_75
          extended by org.java_websocket.drafts.Draft_76

public class Draft_76
extends Draft_75


Nested Class Summary
 
Nested classes/interfaces inherited from class org.java_websocket.drafts.Draft
Draft.CloseHandshakeType, Draft.HandshakeState
 
Field Summary
 
Fields inherited from class org.java_websocket.drafts.Draft_75
CR, currentFrame, END_OF_FRAME, LF, readingState, readyframes, START_OF_FRAME
 
Fields inherited from class org.java_websocket.drafts.Draft
FLASH_POLICY_REQUEST, INITIAL_FAMESIZE, MAX_FAME_SIZE, role
 
Constructor Summary
Draft_76()
           
 
Method Summary
 Draft.HandshakeState acceptHandshakeAsClient(ClientHandshake request, ServerHandshake response)
           
 Draft.HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata)
           
 Draft copyInstance()
          Drafts must only be by one websocket at all.
 ByteBuffer createBinaryFrame(Framedata framedata)
           
static byte[] createChallenge(String key1, String key2, byte[] key3)
           
 Draft.CloseHandshakeType getCloseHandshakeType()
           
 ClientHandshakeBuilder postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request)
           
 HandshakeBuilder postProcessHandshakeResponseAsServer(ClientHandshake request, ServerHandshakeBuilder response)
           
 List<Framedata> translateFrame(ByteBuffer buffer)
           
 Handshakedata translateHandshake(ByteBuffer buf)
           
 
Methods inherited from class org.java_websocket.drafts.Draft_75
createBuffer, createFrames, createFrames, increaseBuffer, reset, translateRegularFrame
 
Methods inherited from class org.java_websocket.drafts.Draft
basicAccept, checkAlloc, createHandshake, createHandshake, readLine, readStringLine, setParseMode, translateHandshakeHttp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Draft_76

public Draft_76()
Method Detail

createChallenge

public static byte[] createChallenge(String key1,
                                     String key2,
                                     byte[] key3)
                              throws InvalidHandshakeException
Throws:
InvalidHandshakeException

acceptHandshakeAsClient

public Draft.HandshakeState acceptHandshakeAsClient(ClientHandshake request,
                                                    ServerHandshake response)
Overrides:
acceptHandshakeAsClient in class Draft_75

acceptHandshakeAsServer

public Draft.HandshakeState acceptHandshakeAsServer(ClientHandshake handshakedata)
Overrides:
acceptHandshakeAsServer in class Draft_75

postProcessHandshakeRequestAsClient

public ClientHandshakeBuilder postProcessHandshakeRequestAsClient(ClientHandshakeBuilder request)
Overrides:
postProcessHandshakeRequestAsClient in class Draft_75

postProcessHandshakeResponseAsServer

public HandshakeBuilder postProcessHandshakeResponseAsServer(ClientHandshake request,
                                                             ServerHandshakeBuilder response)
                                                      throws InvalidHandshakeException
Overrides:
postProcessHandshakeResponseAsServer in class Draft_75
Throws:
InvalidHandshakeException

translateHandshake

public Handshakedata translateHandshake(ByteBuffer buf)
                                 throws InvalidHandshakeException
Overrides:
translateHandshake in class Draft
Throws:
InvalidHandshakeException

translateFrame

public List<Framedata> translateFrame(ByteBuffer buffer)
                               throws InvalidDataException
Overrides:
translateFrame in class Draft_75
Throws:
InvalidDataException

createBinaryFrame

public ByteBuffer createBinaryFrame(Framedata framedata)
Overrides:
createBinaryFrame in class Draft_75

getCloseHandshakeType

public Draft.CloseHandshakeType getCloseHandshakeType()
Overrides:
getCloseHandshakeType in class Draft_75

copyInstance

public Draft copyInstance()
Description copied from class: Draft
Drafts must only be by one websocket at all. To prevent drafts to be used more than once the Websocket implementation should call this method in order to create a new usable version of a given draft instance.
The copy can be safely used in conjunction with a new websocket connection.

Overrides:
copyInstance in class Draft_75


Copyright © 2013 Pusher. All Rights Reserved.