All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.glassfish.tyrus.platform.DefaultServerEndpointConfiguration Maven / Gradle / Ivy

The newest version!
package org.glassfish.tyrus.platform;

import javax.net.websocket.Endpoint;
import javax.net.websocket.HandshakeRequest;
import javax.net.websocket.HandshakeResponse;
import javax.net.websocket.ServerConfiguration;
import javax.net.websocket.ServerEndpointConfiguration;
import javax.net.websocket.extensions.Extension;
import java.net.URI;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Provides the default {@link ServerConfiguration} used by the {@link BeanServer}.
 *
 * @author Stepan Kopriva (stepan.kopriva at oracle.com)
 */
public class DefaultServerEndpointConfiguration extends DefaultEndpointConfiguration implements ServerEndpointConfiguration {

    /**
     * {@link Endpoint} extensions (user provided).
     */
    private Set extensions = Collections.newSetFromMap(new ConcurrentHashMap());

    /**
     * {@link Endpoint} sub-protocols (user provided).
     */
    private Set subprotocols = Collections.newSetFromMap(new ConcurrentHashMap());

    /**
     * Create new configuration.
     */
    public DefaultServerEndpointConfiguration(){}

    /**
     * Creates new configuration for {@link Endpoint} which is used on the server side.
     *
     * @param model Model of the {@link Endpoint}.
     */
    public DefaultServerEndpointConfiguration(Model model){
        super.setModel(model);
    }

    @Override
    public String getNegotiatedSubprotocol(List requestedSubprotocols) {
        return null;
    }

    @Override
    public List getNegotiatedExtensions(List requestedExtensions) {
        return null;
    }

    @Override
    public boolean checkOrigin(String originHeaderValue) {
        return false;
    }

    @Override
    public boolean matchesURI(URI uri) {
        return false;
    }

    @Override
    public void modifyHandshake(HandshakeRequest request, HandshakeResponse response) {

    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy