Package org.atmosphere.webtransport
Class WebTransportProcessor.WebTransportHandlerProxy
java.lang.Object
org.atmosphere.webtransport.WebTransportProcessor.WebTransportHandlerProxy
- All Implemented Interfaces:
WebTransportHandler
- Enclosing interface:
WebTransportProcessor
public static final class WebTransportProcessor.WebTransportHandlerProxy
extends Object
implements WebTransportHandler
Proxy that associates a
WebTransportHandler with a
Broadcaster class, mirroring
WebSocketProcessor.WebSocketHandlerProxy.-
Constructor Summary
ConstructorsConstructorDescriptionWebTransportHandlerProxy(Class<? extends Broadcaster> broadcasterClazz, WebTransportHandler proxied) -
Method Summary
Modifier and TypeMethodDescriptionvoidonByteMessage(WebTransportSession session, byte[] data, int offset, int length) Invoked when a binary message is received on the bidirectional stream.voidonClose(WebTransportSession session) Invoked when a WebTransport session is closed.voidInvoked when a WebTransport session encounters an error.voidonOpen(WebTransportSession session) Invoked when a WebTransport session is opened.voidonTextMessage(WebTransportSession session, String data) Invoked when a text message is received on the bidirectional stream.path()proxied()
-
Constructor Details
-
WebTransportHandlerProxy
public WebTransportHandlerProxy(Class<? extends Broadcaster> broadcasterClazz, WebTransportHandler proxied) -
WebTransportHandlerProxy
-
-
Method Details
-
path
-
path
-
proxied
-
onByteMessage
public void onByteMessage(WebTransportSession session, byte[] data, int offset, int length) throws IOException Description copied from interface:WebTransportHandlerInvoked when a binary message is received on the bidirectional stream.- Specified by:
onByteMessagein interfaceWebTransportHandler- Parameters:
session- theWebTransportSessiondata- the raw bytesoffset- start offsetlength- number of bytes- Throws:
IOException
-
onTextMessage
Description copied from interface:WebTransportHandlerInvoked when a text message is received on the bidirectional stream.- Specified by:
onTextMessagein interfaceWebTransportHandler- Parameters:
session- theWebTransportSessiondata- the decoded text- Throws:
IOException
-
onOpen
Description copied from interface:WebTransportHandlerInvoked when a WebTransport session is opened.- Specified by:
onOpenin interfaceWebTransportHandler- Parameters:
session- theWebTransportSession- Throws:
IOException
-
onClose
Description copied from interface:WebTransportHandlerInvoked when a WebTransport session is closed.- Specified by:
onClosein interfaceWebTransportHandler- Parameters:
session- theWebTransportSession
-
onError
Description copied from interface:WebTransportHandlerInvoked when a WebTransport session encounters an error.- Specified by:
onErrorin interfaceWebTransportHandler- Parameters:
session- theWebTransportSessiont- the exception
-