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

Part Number E41849-02

weblogic.websocket
Class WebSocketAdapter

java.lang.Object
  extended by weblogic.websocket.WebSocketAdapter
All Implemented Interfaces:
WebSocketListener

Deprecated. As of release 12.1.3, replaced by JSR356: Java API for WebSocket

@Deprecated
public class WebSocketAdapter
extends Object
implements WebSocketListener

Provides a convenient implementation of the WebSocketListener interface. Almost all of the callback methods are implemented as empty methods in this class. Applications can extend this class to override callback methods they care about.

See Also:
WebSocketListener

Field Summary
protected  WebSocketContext context
          Deprecated.  
 
Constructor Summary
WebSocketAdapter()
          Deprecated. Constructs an instance of WebSocketAdapter.
 
Method Summary
 boolean accept(WSHandshakeRequest request, WSHandshakeResponse response)
          Deprecated. This method always return true.
 void destroy()
          Deprecated. Do nothing.
protected  WebSocketContext getWebSocketContext()
          Deprecated. Get a WebSocketContext instance associated with this WebSocketAdapter.
 void init(WebSocketContext context)
          Deprecated. This method is called after the instance of this interface is created.
 void onClose(WebSocketConnection connection, ClosingMessage msg)
          Deprecated. Empty implementation for this callback method.
 void onError(WebSocketConnection connection, Throwable error)
          Deprecated. Empty implementation for this callback method.
 void onFragment(WebSocketConnection connection, boolean last, byte[] payload)
          Deprecated. Empty implementation for this callback method.
 void onFragment(WebSocketConnection connection, boolean last, String payload)
          Deprecated. Empty implementation for this callback method.
 void onMessage(WebSocketConnection connection, byte[] payload)
          Deprecated. Empty implementation for this callback method.
 void onMessage(WebSocketConnection connection, String payload)
          Deprecated. Empty implementation for this callback method.
 void onOpen(WebSocketConnection connection)
          Deprecated. Empty implementation for this callback method.
 void onPing(WebSocketConnection connection, byte[] payload)
          Deprecated. Empty implementation for this callback method.
 void onPong(WebSocketConnection connection, byte[] payload)
          Deprecated. Empty implementation for this callback method.
 void onTimeout(WebSocketConnection connection)
          Deprecated. Empty implementation for this callback method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected WebSocketContext context
Deprecated. 
Constructor Detail

WebSocketAdapter

public WebSocketAdapter()
Deprecated. 
Constructs an instance of WebSocketAdapter.

Method Detail

getWebSocketContext

protected WebSocketContext getWebSocketContext()
Deprecated. 
Get a WebSocketContext instance associated with this WebSocketAdapter.

Returns:
instance of WebSocketContext.

init

public void init(WebSocketContext context)
Deprecated. 
Description copied from interface: WebSocketListener
This method is called after the instance of this interface is created.

Specified by:
init in interface WebSocketListener
Parameters:
context - the WebSocketContext associated with the WebSocket that is listened on by this listener.
See Also:
WebSocketListener.init(weblogic.websocket.WebSocketContext)

destroy

public void destroy()
Deprecated. 
Do nothing. Override this method if there are resources that need to be released.

Specified by:
destroy in interface WebSocketListener
See Also:
WebSocketListener.destroy()

accept

public boolean accept(WSHandshakeRequest request,
                      WSHandshakeResponse response)
Deprecated. 
This method always return true.

Specified by:
accept in interface WebSocketListener
Parameters:
request - the WebSocket opening handshake request.
response - the WebSocket opening handshake response.
Returns:
true if upgrading to WebSocket is acceptable; false otherwise.
See Also:
WebSocketListener.accept(WSHandshakeRequest, WSHandshakeResponse)

onOpen

public void onOpen(WebSocketConnection connection)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onOpen in interface WebSocketListener
Parameters:
connection - the WebSocket connection is established.
See Also:
WebSocketListener.onOpen(weblogic.websocket.WebSocketConnection)

onMessage

public void onMessage(WebSocketConnection connection,
                      String payload)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onMessage in interface WebSocketListener
Parameters:
connection - the WebSocket connection receiving the message.
payload - the received payload from the TEXT data frame.
See Also:
WebSocketListener.onMessage(WebSocketConnection, String)

onMessage

public void onMessage(WebSocketConnection connection,
                      byte[] payload)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onMessage in interface WebSocketListener
Parameters:
connection - the WebSocket connection receiving the message.
payload - the received payload from the BINARY data frame.
See Also:
WebSocketListener.onMessage(WebSocketConnection, byte[])

onFragment

public void onFragment(WebSocketConnection connection,
                       boolean last,
                       String payload)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onFragment in interface WebSocketListener
Parameters:
connection - the WebSocket connection receiving the message.
last - indicates if this is the last fragment to be received.
payload - the received text payload from the CONTINUATION data frame.
See Also:
WebSocketListener.onFragment(WebSocketConnection, boolean, String)

onFragment

public void onFragment(WebSocketConnection connection,
                       boolean last,
                       byte[] payload)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onFragment in interface WebSocketListener
Parameters:
connection - the WebSocket connection receiving the message.
last - indicates if this is the last fragment to be received.
payload - the received binary payload from the CONTINUATION data frame.
See Also:
WebSocketListener.onFragment(WebSocketConnection, boolean, byte[])

onPing

public void onPing(WebSocketConnection connection,
                   byte[] payload)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onPing in interface WebSocketListener
Parameters:
connection - the WebSocket connection receiving the PING control frame.
payload - the received payload from the PING control frame.
See Also:
WebSocketListener.onPing(WebSocketConnection, byte[])

onPong

public void onPong(WebSocketConnection connection,
                   byte[] payload)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onPong in interface WebSocketListener
Parameters:
connection - the WebSocket connection receiving the PONG control frame.
payload - the received payload from the PONG control frame.
See Also:
WebSocketListener.onPong(WebSocketConnection, byte[])

onTimeout

public void onTimeout(WebSocketConnection connection)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onTimeout in interface WebSocketListener
Parameters:
connection - the WebSocket connection that timed out.
See Also:
WebSocketListener.onTimeout(weblogic.websocket.WebSocketConnection)

onError

public void onError(WebSocketConnection connection,
                    Throwable error)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onError in interface WebSocketListener
Parameters:
connection - the WebSocket connection having difficulty.
error - the error encountered in the container.
See Also:
WebSocketListener.onError(WebSocketConnection, Throwable)

onClose

public void onClose(WebSocketConnection connection,
                    ClosingMessage msg)
Deprecated. 
Empty implementation for this callback method.

Specified by:
onClose in interface WebSocketListener
Parameters:
connection - the WebSocket connection receiving the CLOSE control frame.
msg - the close message received.
See Also:
WebSocketListener.onClose(WebSocketConnection, ClosingMessage)

Copyright 1996, 2014, 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.3)

Part Number E41849-02