Example usage for javax.websocket.server ServerEndpointConfig getUserProperties

List of usage examples for javax.websocket.server ServerEndpointConfig getUserProperties

Introduction

In this page you can find the example usage for javax.websocket.server ServerEndpointConfig getUserProperties.

Prototype

Map<String, Object> getUserProperties();

Source Link

Usage

From source file:com.aceevo.ursus.core.UrsusJerseyApplication.java

/**
 * Register a WebSocket endpoint passing in a path and a {@link Map} of UserProperties
 *
 * @param clazz          the websocket endpoint
 * @param path           the path/*from   w ww.jav a 2  s  . c  om*/
 * @param userProperties out user properties.
 */
public void registerEndpoint(Class<? extends Endpoint> clazz, String path, Map<String, Object> userProperties) {
    ServerEndpointConfig serverEndpointConfig = ServerEndpointConfig.Builder.create(clazz, path).build();
    serverEndpointConfig.getUserProperties().putAll(userProperties);
    registerEndpoint(serverEndpointConfig);
}