org.atmosphere.websocket
Interface WebSocketProtocolStream
- All Superinterfaces:
- AtmosphereConfigAware, WebSocketProtocol
- All Known Implementing Classes:
- StreamingHttpProtocol
public interface WebSocketProtocolStream
- extends WebSocketProtocol
A streaming API for WebServer that support WebSocket streaming. When a WebSocketProtocol implements this interface,
bytes/text will ve streamed instead of read in memory.
- Author:
- Jeanfrancois Arcand
onTextStream
List<AtmosphereRequest> onTextStream(WebSocket webSocket,
Reader r)
- Parse the WebSocket stream, and delegate the processing to the
AtmosphereFramework.asyncSupport or
to any existing technology. Invoking AtmosphereFramework.asyncSupport will delegate the request processing
to the AtmosphereHandler implementation. Returning null means this implementation will
handle itself the processing/dispatching of the WebSocket's request;
As an example, this is how Websocket messages are delegated to the
Jersey runtime.
- Parameters:
webSocket - The WebSocket connectionr - a Reader
- Returns:
- a List of
AtmosphereRequest
onBinaryStream
List<AtmosphereRequest> onBinaryStream(WebSocket webSocket,
InputStream stream)
- Parse the WebSocket stream, and delegate the processing to the
AtmosphereFramework.asyncSupport or
to any existing technology. Invoking AtmosphereFramework.asyncSupport will delegate the request processing
to the AtmosphereHandler implementation. Returning null means this implementation will
handle itself the processing/dispatching of the WebSocket's request;
As an example, this is how Websocket messages are delegated to the
Jersey runtime.
- Parameters:
webSocket - The WebSocket connectionstream - a Reader
- Returns:
- a List of
AtmosphereRequest
Copyright © 2015. All Rights Reserved.