Package org.atmosphere.websocket
Interface WebSocketProtocolStream
- All Superinterfaces:
AtmosphereConfigAware,WebSocketProtocol
- All Known Implementing Classes:
StreamingHttpProtocol
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
-
Method Summary
Modifier and TypeMethodDescriptiononBinaryStream(WebSocket webSocket, InputStream stream) Parse the WebSocket stream, and delegate the processing to theAtmosphereFramework.asyncSupportor to any existing technology.onTextStream(WebSocket webSocket, Reader r) Parse the WebSocket stream, and delegate the processing to theAtmosphereFramework.asyncSupportor to any existing technology.Methods inherited from interface org.atmosphere.inject.AtmosphereConfigAware
configure
-
Method Details
-
onTextStream
Parse the WebSocket stream, and delegate the processing to theAtmosphereFramework.asyncSupportor to any existing technology. InvokingAtmosphereFramework.asyncSupportwill delegate the request processing to theAtmosphereHandlerimplementation. 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- TheWebSocketconnectionr- aReader- Returns:
- a List of
AtmosphereRequest
-
onBinaryStream
Parse the WebSocket stream, and delegate the processing to theAtmosphereFramework.asyncSupportor to any existing technology. InvokingAtmosphereFramework.asyncSupportwill delegate the request processing to theAtmosphereHandlerimplementation. 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- TheWebSocketconnectionstream- aReader- Returns:
- a List of
AtmosphereRequest
-