Package org.atmosphere.webtransport
Class WebTransportHandlerAdapter
java.lang.Object
org.atmosphere.webtransport.WebTransportHandlerAdapter
- All Implemented Interfaces:
WebTransportHandler
No-op adapter for
WebTransportHandler. Extend this class and
override only the callbacks you need.-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
WebTransportHandlerAdapter
public WebTransportHandlerAdapter()
-
-
Method Details
-
onByteMessage
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
-
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
-
onOpen
Description copied from interface:WebTransportHandlerInvoked when a WebTransport session is opened.- Specified by:
onOpenin interfaceWebTransportHandler- Parameters:
session- theWebTransportSession
-
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
-