|
Oracle Fusion Middleware Java API Reference for Oracle WebLogic Server 12c (12.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Deprecated. As of release 12.1.3, replaced by JSR356: Java API for WebSocket
@Deprecated
public interface WebSocketConnection
This class represents the WebSocket connection established between the client and server. It provides methods which can be used by an application to manipulate the connection.
Method Summary | |
---|---|
abstract void |
close(int code) Deprecated. Initiating closing handshake with specified status code. |
abstract void |
close(int code, String reason) Deprecated. Initiating closing handshake with specified status code and reason string. |
abstract String |
getRemoteAddress() Deprecated. Returns the Internet Protocol (IP) address of the client or last proxy that sent the request. |
abstract int |
getRemotePort() Deprecated. Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request. |
abstract String |
getRemoteUser() Deprecated. Returns the login of the user making websocket handshake request if the user has been authenticated, or null if the user has not been authenticated. |
abstract String |
getRequestURI() Deprecated. Returns the part of websocket handshake request's URL from the protocol name up to the query string. |
abstract Principal |
getUserPrincipal() Deprecated. Returns a java.security.Principal object containing the name of the authenticated user making websocket handshake request, or null if the user has not been authenticated. |
abstract WebSocketContext |
getWebSocketContext() Deprecated. Returns the WebSocketContext instance associated with this WebSocket connection. |
abstract boolean |
isOpen() Deprecated. Returns the open state of the WebSocket connection. |
abstract boolean |
isSecure() Deprecated. Returns a boolean indicating whether this request was made using a secure channel. |
abstract void |
send(byte[] message) Deprecated. Send binary data to client. |
abstract void |
send(String message) Deprecated. Send "UTF-8" encoded text data to client. |
abstract void |
sendPing(byte[] message) Deprecated. Send a ping frame with the specified data (if any). |
abstract void |
sendPong(byte[] message) Deprecated. Send a pong frame with the specified data (if any). |
abstract void |
stream(boolean last, byte[] fragment, int off, int length) Deprecated. Send a fragment of a complete message. |
abstract void |
stream(boolean last, String fragment) Deprecated. Send a fragment of a complete message. |
Method Detail |
---|
void send(String message) throws IOException, IllegalStateException
message
- "UTF-8" encoded text data.IOException
- if error occurs when writing data to the WebSocket.IllegalStateException
- if connection is closed.void send(byte[] message) throws IOException, IllegalStateException
message
- binary data.IOException
- if error occurs when writing data to the WebSocket.IllegalStateException
- if connection is closed.void sendPing(byte[] message) throws IOException, IllegalStateException
message
- optional data.IOException
- if error occurs when writing data to the WebSocket.IllegalStateException
- if connection is closed.void sendPong(byte[] message) throws IOException, IllegalStateException
message
- optional data.IOException
- if error occurs when writing data to the WebSocket.IllegalStateException
- if connection is closed.void stream(boolean last, String fragment) throws IOException, IllegalStateException
last
- boolean indicating if this message fragment is the last.fragment
- the textual fragment to send.IOException
- if error occurs when sending fragment to the WebSocket.IllegalStateException
- if connection is closed.void stream(boolean last, byte[] fragment, int off, int length) throws IOException, IllegalStateException
last
- boolean indicating if this message fragment is the last.fragment
- the binary fragment to send.off
- the offset within the fragment to send.length
- the number of bytes of the fragment to send.IOException
- if error occurs when sending the fragment to the WebSocket.IllegalStateException
- if connection is closed.void close(int code) throws IOException
code
- closing status code.IOException
- if error occurs when sending the closing message.ClosingMessage
void close(int code, String reason) throws IOException
code
- closing status code.reason
- string for closing.IOException
- if error occurs when sending the closing message.ClosingMessage
boolean isOpen()
boolean isSecure()
String getRemoteAddress()
String
containing the IP address of the client that sent the request.int getRemotePort()
String getRemoteUser()
null
if the user has not been authenticated.String
specifying the login of the user making websocket handshake request, or null
if the user login is unknown.String getRequestURI()
javax.servlet.http.HttpServletRequest.getRequestURI()
method.String
containing the part of websocket handshake request's URL from the protocol name up to the query string.Principal getUserPrincipal()
java.security.Principal
object containing the name of the authenticated user making websocket handshake request, or null
if the user has not been authenticated.java.security.Principal
containing the name of the authenticated user making websocket handshake request; or null
if the user has not been authenticated.WebSocketContext getWebSocketContext()
WebSocketContext
instance associated with this WebSocket connection.
|
Copyright 1996, 2015, 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.2.1) Part Number E55141-01 P4 Change 1723563 on 2015/10/09 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |