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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>closeMethod()Returns the method annotated withOnClose.java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>errorMethod()Returns the method annotated withOnError.io.micronaut.inject.BeanDefinition<T>getBeanDefinition()The bean definition.TgetTarget()java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>messageMethod()Returns the method annotated withOnMessageresponsible for regular messages.java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>openMethod()Returns the method annotated withOnOpen.default java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>pongMethod()Returns the method annotated withOnMessageresponsible for pong messages.
-
-
-
Method Detail
-
getBeanDefinition
io.micronaut.inject.BeanDefinition<T> getBeanDefinition()
The bean definition.- Returns:
- The bean definition
-
getTarget
T getTarget()
- Returns:
- The target instance
-
messageMethod
java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> messageMethod()
Returns the method annotated withOnMessageresponsible for regular messages.- Returns:
- the method
-
pongMethod
default java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> pongMethod()
Returns the method annotated withOnMessageresponsible for pong messages.- Returns:
- the method
- Since:
- 3.1
-
closeMethod
java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> closeMethod()
Returns the method annotated withOnClose.- Returns:
- the method
-
openMethod
java.util.Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> openMethod()
Returns the method annotated withOnOpen.- Returns:
- the method
-
-