org.atmosphere.samples.pubsub.config.protocol
Class DelegatingWebSocketProtocol

java.lang.Object
  extended by org.atmosphere.samples.pubsub.config.protocol.DelegatingWebSocketProtocol
All Implemented Interfaces:
AsyncProtocol, WebSocketProtocol

public class DelegatingWebSocketProtocol
extends Object
implements WebSocketProtocol


Field Summary
static org.slf4j.Logger LOG
           
 
Constructor Summary
DelegatingWebSocketProtocol()
           
 
Method Summary
 void configure(AtmosphereConfig atmosphereConfig)
           
 byte[] handleResponse(AtmosphereResponse atmosphereResponse, byte[] message, int offset, int length)
           
 String handleResponse(AtmosphereResponse atmosphereResponse, String message)
           
 boolean inspectResponse()
           
 void onClose(WebSocket webSocket)
           
 void onError(WebSocket webSocket, WebSocketProcessor.WebSocketException e)
           
 List<AtmosphereRequest> onMessage(WebSocket webSocket, byte[] bytes, int offset, int length)
           
 List<AtmosphereRequest> onMessage(WebSocket webSocket, String message)
           
 void onOpen(WebSocket webSocket)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.slf4j.Logger LOG
Constructor Detail

DelegatingWebSocketProtocol

public DelegatingWebSocketProtocol()
Method Detail

configure

public void configure(AtmosphereConfig atmosphereConfig)
Specified by:
configure in interface WebSocketProtocol

onMessage

public List<AtmosphereRequest> onMessage(WebSocket webSocket,
                                         String message)
Specified by:
onMessage in interface WebSocketProtocol

onMessage

public List<AtmosphereRequest> onMessage(WebSocket webSocket,
                                         byte[] bytes,
                                         int offset,
                                         int length)
Specified by:
onMessage in interface WebSocketProtocol

onOpen

public void onOpen(WebSocket webSocket)
Specified by:
onOpen in interface WebSocketProtocol

onClose

public void onClose(WebSocket webSocket)
Specified by:
onClose in interface WebSocketProtocol

onError

public void onError(WebSocket webSocket,
                    WebSocketProcessor.WebSocketException e)
Specified by:
onError in interface WebSocketProtocol

inspectResponse

public boolean inspectResponse()
Specified by:
inspectResponse in interface AsyncProtocol

handleResponse

public String handleResponse(AtmosphereResponse atmosphereResponse,
                             String message)
Specified by:
handleResponse in interface AsyncProtocol

handleResponse

public byte[] handleResponse(AtmosphereResponse atmosphereResponse,
                             byte[] message,
                             int offset,
                             int length)
Specified by:
handleResponse in interface AsyncProtocol


Copyright © 2012. All Rights Reserved.