Package io.micronaut.websocket.context
Interface WebSocketBean<T>
- Type Parameters:
T- The target type
public interface WebSocketBean<T>
Wrapper around a WebSocket instance that enables the retrieval of the appropriate methods.
- Since:
- 1.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescriptionReturns the method annotated withOnClose.Returns the method annotated withOnError.The bean definition.Returns the method annotated withOnMessageresponsible for regular messages.Returns the method annotated withOnOpen.default Optional<MethodExecutionHandle<T,?>> Returns the method annotated withOnMessageresponsible for pong messages.
-
Method Details
-
getBeanDefinition
BeanDefinition<T> getBeanDefinition()The bean definition.- Returns:
- The bean definition
-
getTarget
T getTarget()- Returns:
- The target instance
-
messageMethod
Optional<MethodExecutionHandle<T,?>> messageMethod()Returns the method annotated withOnMessageresponsible for regular messages.- Returns:
- the method
-
pongMethod
Returns the method annotated withOnMessageresponsible for pong messages.- Returns:
- the method
- Since:
- 3.1
-
closeMethod
Optional<MethodExecutionHandle<T,?>> closeMethod()Returns the method annotated withOnClose.- Returns:
- the method
-
openMethod
Optional<MethodExecutionHandle<T,?>> openMethod()Returns the method annotated withOnOpen.- Returns:
- the method
-
errorMethod
Optional<MethodExecutionHandle<T,?>> errorMethod()Returns the method annotated withOnError.- Returns:
- the method
-