Package org.atmosphere.container.version
Class JSR356WebSocket
java.lang.Object
org.atmosphere.cpr.AsyncIOWriterAdapter
org.atmosphere.cpr.AtmosphereInterceptorWriter
org.atmosphere.websocket.WebSocket
org.atmosphere.container.version.JSR356WebSocket
- All Implemented Interfaces:
AsyncIOWriter,KeepOpenStreamAware
Asynchronous based
Session websocket-
Field Summary
Fields inherited from class org.atmosphere.websocket.WebSocket
bb, binaryWrite, cb, CLEAN_CLOSE, lastWrite, NOT_SUPPORTED, uuid, WEBSOCKET_ACCEPT_DONE, WEBSOCKET_INITIATED, WEBSOCKET_RESUME, WEBSOCKET_SUSPENDFields inherited from class org.atmosphere.cpr.AtmosphereInterceptorWriter
filters, reversedFilters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the underlying WebSocketvoidAllow the underlying WebSocket to close with a code and a reason.booleanisOpen()Is the underlying WebSocket open.sendPing(byte[] payload) Send a WebSocket Ping.sendPong(byte[] payload) Send a WebSocket Pong.write(byte[] data, int offset, int length) Use the underlying container's websocket to write the byte.Use the underlying container's websocket to write the String.Methods inherited from class org.atmosphere.websocket.WebSocket
attachment, attachment, attributes, binaryWrite, broadcast, close, config, flush, lastWriteTimeStampInMilliseconds, notSupported, redirect, resource, resource, shiftAttributes, transform, transform, uuid, webSocketHandler, webSocketHandler, write, write, write, write, writeErrorMethods inherited from class org.atmosphere.cpr.AtmosphereInterceptorWriter
filters, interceptor, interceptor, invokeInterceptor, writeReady
-
Constructor Details
-
JSR356WebSocket
-
-
Method Details
-
isOpen
public boolean isOpen()Description copied from class:WebSocketIs the underlying WebSocket open. -
write
Description copied from class:WebSocketUse the underlying container's websocket to write the String.- Specified by:
writein classWebSocket- Parameters:
s- a websocket String message- Returns:
- this
- Throws:
IOException
-
write
Description copied from class:WebSocketUse the underlying container's websocket to write the byte.- Specified by:
writein classWebSocket- Parameters:
data- a websocket byte messageoffset- startlength- end- Returns:
- this
- Throws:
IOException
-
close
public void close()Description copied from class:WebSocketClose the underlying WebSocket -
close
Description copied from class:WebSocketAllow the underlying WebSocket to close with a code and a reason. The base implementation closes the socket without transmitting the code and reason — bindings whose native API can carry them override this. It must never silently leave the connection open. -
sendPing
Description copied from class:WebSocketSend a WebSocket Ping. Supported by the JSR356 binding (every servlet container); bindings whose native API has no control-frame access throwUnsupportedOperationException. -
sendPong
Description copied from class:WebSocketSend a WebSocket Pong. Supported by the JSR356 binding (every servlet container); bindings whose native API has no control-frame access throwUnsupportedOperationException.
-