Package io.mangoo.services
Class WebSocketService
- java.lang.Object
-
- io.mangoo.services.WebSocketService
-
public class WebSocketService extends Object
- Author:
- svenkubiak
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChannel(io.undertow.websockets.core.WebSocketChannel channel)Adds a new channel to the managervoidclose(String uri)Closes all connections for a given URI resourceSet<io.undertow.websockets.core.WebSocketChannel>getChannels(String uri)Retrieves all channels under a given URLvoidremoveChannels(String uri)Removes all URI resources for a given URLvoidsetChannels(String uri, Set<io.undertow.websockets.core.WebSocketChannel> channels)Sets the URI resources for a given URL
-
-
-
Method Detail
-
addChannel
public void addChannel(io.undertow.websockets.core.WebSocketChannel channel)
Adds a new channel to the manager- Parameters:
channel- channel The channel to put
-
setChannels
public void setChannels(String uri, Set<io.undertow.websockets.core.WebSocketChannel> channels)
Sets the URI resources for a given URL- Parameters:
uri- The URI resource for the connectionchannels- The channels for the URI resource
-
getChannels
public Set<io.undertow.websockets.core.WebSocketChannel> getChannels(String uri)
Retrieves all channels under a given URL- Parameters:
uri- The URI resource for the channels- Returns:
- A Set of channels for the URI resource
-
removeChannels
public void removeChannels(String uri)
Removes all URI resources for a given URL- Parameters:
uri- The URI resource for the connection
-
close
public void close(String uri)
Closes all connections for a given URI resource- Parameters:
uri- The URI resource for the connection
-
-