Package org.atmosphere.container.version
Class TomcatWebSocket
java.lang.Object
org.atmosphere.cpr.AsyncIOWriterAdapter
org.atmosphere.cpr.AtmosphereInterceptorWriter
org.atmosphere.websocket.WebSocket
org.atmosphere.container.version.TomcatWebSocket
- All Implemented Interfaces:
AsyncIOWriter,KeepOpenStreamAware
Tomcat WebSocket Support
- Author:
- Jeanfrancois Arcand
-
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
ConstructorsConstructorDescriptionTomcatWebSocket(org.apache.catalina.websocket.WsOutbound outbound, AtmosphereConfig config) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the underlying WebSocketvoidClose the underlying connection.Flush the buffered content.booleanisOpen()Is the underlying WebSocket open.toString()write(byte[] b, 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, lastWriteTimeStampInMilliseconds, notSupported, redirect, resource, resource, sendPing, sendPong, 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
-
TomcatWebSocket
-
-
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:
b- 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 interface:AsyncIOWriterClose the underlying connection.- Specified by:
closein interfaceAsyncIOWriter- Overrides:
closein classWebSocket- Throws:
IOException
-
flush
Description copied from interface:AsyncIOWriterFlush the buffered content.- Specified by:
flushin interfaceAsyncIOWriter- Overrides:
flushin classWebSocket- Throws:
IOException
-
toString
-