com.sun.grizzly.websockets
Class HandShake

java.lang.Object
  extended by com.sun.grizzly.websockets.HandShake
Direct Known Subclasses:
HandShake06, HandShake76

public abstract class HandShake
extends Object

Author:
Justin Lee

Constructor Summary
HandShake()
           
HandShake(Request request)
           
HandShake(URL url)
           
 
Method Summary
protected  void buildLocation()
           
protected  void checkForHeader(Map<String,String> headers, String header, String validValue)
           
protected  void checkForHeader(MimeHeaders headers, String header, String validValue)
           
 List<String> getExtensions()
           
 String getLocation()
           
 String getOrigin()
           
 int getPort()
           
 String getResourcePath()
           
 String getServerHostName()
           
 List<String> getSubProtocol()
           
 void initiate(NetworkHandler handler)
           
 boolean isSecure()
           
protected  String join(List<String> values)
           
 String readHeader(MimeHeaders headers, String name)
          Reads the header value using UTF-8 encoding
 void respond(WebSocketApplication application, Response response)
           
 void setExtensions(List<String> extensions)
           
protected abstract  void setHeaders(Response response)
           
 void setLocation(String location)
           
 void setOrigin(String origin)
           
 void setPort(int port)
           
 void setResourcePath(String resourcePath)
           
 void setSecure(boolean secure)
           
 void setServerHostName(String serverHostName)
           
 void setSubProtocol(List<String> subProtocol)
           
protected  List<String> split(String header)
           
 void validateServerResponse(Map<String,String> map)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandShake

public HandShake()

HandShake

public HandShake(URL url)

HandShake

public HandShake(Request request)
Method Detail

buildLocation

protected final void buildLocation()

getLocation

public String getLocation()

setLocation

public void setLocation(String location)

getOrigin

public String getOrigin()

setOrigin

public void setOrigin(String origin)

getPort

public int getPort()

setPort

public void setPort(int port)

setResourcePath

public void setResourcePath(String resourcePath)

getResourcePath

public String getResourcePath()

isSecure

public boolean isSecure()

setSecure

public final void setSecure(boolean secure)

getServerHostName

public String getServerHostName()

setServerHostName

public void setServerHostName(String serverHostName)

getSubProtocol

public List<String> getSubProtocol()

setSubProtocol

public void setSubProtocol(List<String> subProtocol)

getExtensions

public List<String> getExtensions()

setExtensions

public void setExtensions(List<String> extensions)

join

protected String join(List<String> values)

checkForHeader

protected void checkForHeader(Map<String,String> headers,
                              String header,
                              String validValue)

checkForHeader

protected final void checkForHeader(MimeHeaders headers,
                                    String header,
                                    String validValue)

readHeader

public final String readHeader(MimeHeaders headers,
                               String name)
Reads the header value using UTF-8 encoding

Parameters:
headers -
name -
Returns:

initiate

public void initiate(NetworkHandler handler)

validateServerResponse

public void validateServerResponse(Map<String,String> map)

respond

public void respond(WebSocketApplication application,
                    Response response)

setHeaders

protected abstract void setHeaders(Response response)

split

protected final List<String> split(String header)


Copyright © 2013 Oracle Corporation. All Rights Reserved.