Package org.atmosphere.webtransport
Class WebTransportProcessorAdapter
java.lang.Object
org.atmosphere.webtransport.WebTransportProcessorAdapter
- All Implemented Interfaces:
WebTransportProcessor
No-op adapter for
WebTransportProcessor. Used as the default when
no container-specific implementation is available.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.atmosphere.webtransport.WebTransportProcessor
WebTransportProcessor.WebTransportException, WebTransportProcessor.WebTransportHandlerProxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(WebTransportSession session, int closeCode) Invoked when the WebTransport session is closed.configure(AtmosphereConfig config) Configure this processor.voiddestroy()Destroy all resources associated with this processor.voidinvokeWebTransportProtocol(WebTransportSession session, byte[] data, int offset, int length) Invoked when a binary message is received on a bidirectional stream.voidinvokeWebTransportProtocol(WebTransportSession session, String message) Invoked when a text message is received on a bidirectional stream.voidnotifyListener(WebTransportSession session, WebTransportEventListener.WebTransportEvent<?> event) Notify allWebTransportEventListeners of an event.voidopen(WebTransportSession session, AtmosphereRequest request, AtmosphereResponse response) Invoked when a WebTransport session is opened.Register aWebTransportHandlerfor a given path.
-
Constructor Details
-
WebTransportProcessorAdapter
public WebTransportProcessorAdapter()
-
-
Method Details
-
configure
Description copied from interface:WebTransportProcessorConfigure this processor.- Specified by:
configurein interfaceWebTransportProcessor- Parameters:
config- theAtmosphereConfig- Returns:
- this
-
registerWebTransportHandler
public WebTransportProcessor registerWebTransportHandler(String path, WebTransportProcessor.WebTransportHandlerProxy handler) Description copied from interface:WebTransportProcessorRegister aWebTransportHandlerfor a given path.- Specified by:
registerWebTransportHandlerin interfaceWebTransportProcessor- Parameters:
path- the URI mappinghandler- aWebTransportProcessor.WebTransportHandlerProxy- Returns:
- this
-
open
public void open(WebTransportSession session, AtmosphereRequest request, AtmosphereResponse response) Description copied from interface:WebTransportProcessorInvoked when a WebTransport session is opened.- Specified by:
openin interfaceWebTransportProcessor- Parameters:
session- theWebTransportSessionrequest- the initialAtmosphereRequestresponse- theAtmosphereResponse
-
invokeWebTransportProtocol
Description copied from interface:WebTransportProcessorInvoked when a text message is received on a bidirectional stream.- Specified by:
invokeWebTransportProtocolin interfaceWebTransportProcessor- Parameters:
session- theWebTransportSessionmessage- the text message
-
invokeWebTransportProtocol
public void invokeWebTransportProtocol(WebTransportSession session, byte[] data, int offset, int length) Description copied from interface:WebTransportProcessorInvoked when a binary message is received on a bidirectional stream.- Specified by:
invokeWebTransportProtocolin interfaceWebTransportProcessor- Parameters:
session- theWebTransportSessiondata- the raw bytesoffset- start offsetlength- number of bytes
-
close
Description copied from interface:WebTransportProcessorInvoked when the WebTransport session is closed.- Specified by:
closein interfaceWebTransportProcessor- Parameters:
session- theWebTransportSessioncloseCode- the HTTP/3 error code (0-255)
-
notifyListener
public void notifyListener(WebTransportSession session, WebTransportEventListener.WebTransportEvent<?> event) Description copied from interface:WebTransportProcessorNotify allWebTransportEventListeners of an event.- Specified by:
notifyListenerin interfaceWebTransportProcessor- Parameters:
session- theWebTransportSessionevent- the event
-
destroy
public void destroy()Description copied from interface:WebTransportProcessorDestroy all resources associated with this processor.- Specified by:
destroyin interfaceWebTransportProcessor
-