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

    Modifier and Type
    Method
    Description
    Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>
    Returns the method annotated with OnClose.
    Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>
    Returns the method annotated with OnError.
    io.micronaut.inject.BeanDefinition<T>
    The bean definition.
     
    Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>
    Returns the method annotated with OnMessage responsible for regular messages.
    Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>
    Returns the method annotated with OnOpen.
    default Optional<io.micronaut.inject.MethodExecutionHandle<T,?>>
    Returns the method annotated with OnMessage responsible for pong messages.
  • Method Details

    • getBeanDefinition

      io.micronaut.inject.BeanDefinition<T> getBeanDefinition()
      The bean definition.
      Returns:
      The bean definition
    • getTarget

      T getTarget()
      Returns:
      The target instance
    • messageMethod

      Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> messageMethod()
      Returns the method annotated with OnMessage responsible for regular messages.
      Returns:
      the method
    • pongMethod

      default Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> pongMethod()
      Returns the method annotated with OnMessage responsible for pong messages.
      Returns:
      the method
      Since:
      3.1
    • closeMethod

      Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> closeMethod()
      Returns the method annotated with OnClose.
      Returns:
      the method
    • openMethod

      Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> openMethod()
      Returns the method annotated with OnOpen.
      Returns:
      the method
    • errorMethod

      Optional<io.micronaut.inject.MethodExecutionHandle<T,?>> errorMethod()
      Returns the method annotated with OnError.
      Returns:
      the method