org.glassfish.tyrus.server
Class DefaultServerEndpointConfiguration

java.lang.Object
  extended by org.glassfish.tyrus.DefaultEndpointConfiguration
      extended by org.glassfish.tyrus.server.DefaultServerEndpointConfiguration
All Implemented Interfaces:
javax.net.websocket.EndpointConfiguration, javax.net.websocket.ServerEndpointConfiguration

public class DefaultServerEndpointConfiguration
extends DefaultEndpointConfiguration
implements javax.net.websocket.ServerEndpointConfiguration

Provides the default ServerEndpointConfiguration.

Author:
Stepan Kopriva (stepan.kopriva at oracle.com)

Nested Class Summary
static class DefaultServerEndpointConfiguration.Builder
          Builder class used to build the DefaultServerEndpointConfiguration.
 
Field Summary
 
Fields inherited from class org.glassfish.tyrus.DefaultEndpointConfiguration
extensions, subProtocols, uri
 
Constructor Summary
protected DefaultServerEndpointConfiguration(String uri, List<javax.net.websocket.Encoder> encoders, List<javax.net.websocket.Decoder> decoders, List<String> subprotocols, List<String> extensions, List<String> origins)
          Creates new configuration for Endpoint which is used on the server side.
 
Method Summary
 boolean checkOrigin(String originHeaderValue)
           
 List<String> getNegotiatedExtensions(List<String> requestedExtensions)
           
 String getNegotiatedSubprotocol(List<String> requestedSubprotocols)
           
 boolean matchesURI(URI uri)
           
 void modifyHandshake(javax.net.websocket.HandshakeRequest request, javax.net.websocket.HandshakeResponse response)
           
 
Methods inherited from class org.glassfish.tyrus.DefaultEndpointConfiguration
getDecoders, getEncoders, getPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.net.websocket.EndpointConfiguration
getDecoders, getEncoders, getPath
 

Constructor Detail

DefaultServerEndpointConfiguration

protected DefaultServerEndpointConfiguration(String uri,
                                             List<javax.net.websocket.Encoder> encoders,
                                             List<javax.net.websocket.Decoder> decoders,
                                             List<String> subprotocols,
                                             List<String> extensions,
                                             List<String> origins)
Creates new configuration for Endpoint which is used on the server side.

Parameters:
encoders - message encoders.
decoders - message decoders.
subprotocols - supported sub - protocols.
extensions - supported extensions.
origins - accepted origins.
Method Detail

getNegotiatedSubprotocol

public String getNegotiatedSubprotocol(List<String> requestedSubprotocols)
Specified by:
getNegotiatedSubprotocol in interface javax.net.websocket.ServerEndpointConfiguration

getNegotiatedExtensions

public List<String> getNegotiatedExtensions(List<String> requestedExtensions)
Specified by:
getNegotiatedExtensions in interface javax.net.websocket.ServerEndpointConfiguration

checkOrigin

public boolean checkOrigin(String originHeaderValue)
Specified by:
checkOrigin in interface javax.net.websocket.ServerEndpointConfiguration

matchesURI

public boolean matchesURI(URI uri)
Specified by:
matchesURI in interface javax.net.websocket.ServerEndpointConfiguration

modifyHandshake

public void modifyHandshake(javax.net.websocket.HandshakeRequest request,
                            javax.net.websocket.HandshakeResponse response)
Specified by:
modifyHandshake in interface javax.net.websocket.ServerEndpointConfiguration


Copyright © 2012. All Rights Reserved.