Package org.atmosphere.container.version
Class Jetty8WebSocket
- java.lang.Object
-
- org.atmosphere.cpr.AsyncIOWriterAdapter
-
- org.atmosphere.cpr.AtmosphereInterceptorWriter
-
- org.atmosphere.websocket.WebSocket
-
- org.atmosphere.container.version.Jetty8WebSocket
-
- All Implemented Interfaces:
AsyncIOWriter,KeepOpenStreamAware
public class Jetty8WebSocket extends WebSocket
Jetty 8 WebSocket support.- Author:
- Jeanfrancois Arcand
-
-
Field Summary
-
Fields inherited from class org.atmosphere.websocket.WebSocket
bb, binaryWrite, cb, CLEAN_CLOSE, lastWrite, logger, NOT_SUPPORTED, uuid, WEBSOCKET_ACCEPT_DONE, WEBSOCKET_INITIATED, WEBSOCKET_RESUME, WEBSOCKET_SUSPEND
-
Fields inherited from class org.atmosphere.cpr.AtmosphereInterceptorWriter
filters, reversedFilters
-
-
Constructor Summary
Constructors Constructor Description Jetty8WebSocket(org.eclipse.jetty.websocket.WebSocket.Connection connection, AtmosphereConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the underlying WebSocketWebSocketflush(AtmosphereResponse r)Flush the buffered content.booleanisOpen()Is the underlying WebSocket open.java.lang.StringtoString()WebSocketwrite(byte[] b, int offset, int length)Use the underlying container's websocket to write the byte.WebSocketwrite(java.lang.String s)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, writeError
-
Methods inherited from class org.atmosphere.cpr.AtmosphereInterceptorWriter
filters, interceptor, interceptor, invokeInterceptor, writeReady
-
-
-
-
Constructor Detail
-
Jetty8WebSocket
public Jetty8WebSocket(org.eclipse.jetty.websocket.WebSocket.Connection connection, AtmosphereConfig config)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isOpen
public boolean isOpen()
Description copied from class:WebSocketIs the underlying WebSocket open.
-
write
public WebSocket write(java.lang.String s) throws java.io.IOException
Description copied from class:WebSocketUse the underlying container's websocket to write the String.
-
write
public WebSocket write(byte[] b, int offset, int length) throws java.io.IOException
Description copied from class:WebSocketUse the underlying container's websocket to write the byte.
-
close
public void close()
Description copied from class:WebSocketClose the underlying WebSocket
-
flush
public WebSocket flush(AtmosphereResponse r) throws java.io.IOException
Description copied from interface:AsyncIOWriterFlush the buffered content.- Specified by:
flushin interfaceAsyncIOWriter- Overrides:
flushin classWebSocket- Throws:
java.io.IOException
-
-