Package io.micronaut.websocket.context
Interface WebSocketBeanRegistry
public interface WebSocketBeanRegistry
Registry for WebSocket beans.
- Since:
- 1.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic WebSocketBeanRegistryforClient(io.micronaut.context.BeanContext beanContext) Create aWebSocketBeanRegistryfrom the given bean context.static WebSocketBeanRegistryforServer(io.micronaut.context.BeanContext beanContext) Create aWebSocketBeanRegistryfrom the given bean context.<T> WebSocketBean<T>getWebSocket(Class<T> type) Retrieves aWebSocketBean.
-
Field Details
-
EMPTY
An empty registry.
-
-
Method Details
-
getWebSocket
Retrieves aWebSocketBean.- Type Parameters:
T- The generic type- Parameters:
type- The type- Returns:
- The
WebSocketBean - Throws:
io.micronaut.context.exceptions.NoSuchBeanException- if the bean doesn't exist
-
forServer
Create aWebSocketBeanRegistryfrom the given bean context.- Parameters:
beanContext- The bean context- Returns:
- The
WebSocketBeanRegistry
-
forClient
Create aWebSocketBeanRegistryfrom the given bean context.- Parameters:
beanContext- The bean context- Returns:
- The
WebSocketBeanRegistry
-