On 18/02/2013 00:02, Konstantin Kolinko wrote:
> 2013/2/14 <[email protected]>:
>> @Override
>> public Set<Session> getOpenSessions() {
>> - // TODO Auto-generated method stub
>> - return null;
>> + return webSocketContainer.getOpenSession(localEndpoint.getClass());
>
> Inconsistent method names. s/getOpenSession/getOpenSessions/
Fixed.
>> + Set<Session> getOpenSession(Class<?> endpoint) {
>> + HashSet<Session> result = new HashSet<>();
>> + result.addAll(endpointSessionMap.get(endpoint));
>> + return result;
>
> endpointSessionMap is a mere HashMap.
> I think a lock is needed here, or a ConcurrentHashMap.
Fixed.
Thanks,
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]