Package 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 aWebSocketProtocolimplements this interface, bytes/text will ve streamed instead of read in memory.- Author:
- Jeanfrancois Arcand
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<AtmosphereRequest>onBinaryStream(WebSocket webSocket, java.io.InputStream stream)Parse the WebSocket stream, and delegate the processing to theAtmosphereFramework.asyncSupportor to any existing technology.java.util.List<AtmosphereRequest>onTextStream(WebSocket webSocket, java.io.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 Detail
-
onTextStream
java.util.List<AtmosphereRequest> onTextStream(WebSocket webSocket, java.io.Reader r)
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
java.util.List<AtmosphereRequest> onBinaryStream(WebSocket webSocket, java.io.InputStream stream)
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
-
-