Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01

weblogic.websocket
Class WSHandshakeRequest

java.lang.Object
  extended by javax.servlet.ServletRequestWrapper
      extended by javax.servlet.http.HttpServletRequestWrapper
          extended by weblogic.websocket.WSHandshakeRequest
All Implemented Interfaces:
HttpServletRequest, ServletRequest

public class WSHandshakeRequest
extends HttpServletRequestWrapper

Defines an object to provide the WebSocket opening handshake request information to a WebSocketListener. The container creates a WSHandshakeRequest object and passes it as an argument to the accept method of a WebSocket listener.

Except for providing HTTP request information, including the parameter name and values, cookies, etc, WSHandshakeRequest provides additional WebSocket Protocol specific data, such as the WebSocket version, WebSocket subprotocols, etc.


Field Summary
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
WSHandshakeRequest(WebSocketContext context, HttpServletRequest request)
          Constructs a new instance of WSHandshakeRequest.
 
Method Summary
 String[] getExtensions()
          Returns extensions in the handshake request.
 String getOrigin()
          Returns "Origin" header in the handshake request.
 String getResourcePath()
          Returns the resource path of the WebSocket.
 String[] getSubProtocols()
          Returns subprotocols in the handshake request.
 int getVersion()
          Returns the WebSocket version.
 
Methods inherited from class javax.servlet.http.HttpServletRequestWrapper
authenticate, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole, login, logout
 
Methods inherited from class javax.servlet.ServletRequestWrapper
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.ServletRequest
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
 

Constructor Detail

WSHandshakeRequest

public WSHandshakeRequest(WebSocketContext context,
                          HttpServletRequest request)
Constructs a new instance of WSHandshakeRequest.

Parameters:
context - instance of WebSocketContext
request - instance of HttpServletRequest
Throws:
HandshakeException
Method Detail

getOrigin

public String getOrigin()
Returns "Origin" header in the handshake request.

Returns:
"Origin" header

getResourcePath

public String getResourcePath()
Returns the resource path of the WebSocket.

Returns:
resource path

getSubProtocols

public String[] getSubProtocols()
Returns subprotocols in the handshake request.

Returns:
subprotocols

getExtensions

public String[] getExtensions()
Returns extensions in the handshake request.

Returns:
extensions

getVersion

public int getVersion()
Returns the WebSocket version.

Returns:
WebSocket version

Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01