org.glassfish.tyrus.platform
Class ServerContainerImpl

java.lang.Object
  extended by org.glassfish.tyrus.platform.ServerContainerImpl
All Implemented Interfaces:
javax.net.websocket.ClientContainer, javax.net.websocket.ServerContainer

public class ServerContainerImpl
extends java.lang.Object
implements javax.net.websocket.ServerContainer

Server Container Implementation.

Author:
dannycoward

Constructor Summary
ServerContainerImpl(BeanServer beanServer, java.lang.String wsPath, int port)
           
 
Method Summary
 void connectToServer(javax.net.websocket.Endpoint endpoint, javax.net.websocket.ClientConfiguration olc)
           
 java.util.Set<javax.net.websocket.Session> getActiveSessions()
          Return an unordered collection of the currently active web socket sessions.
 java.lang.ClassLoader getApplicationLevelClassLoader()
           
 long getMaxBinaryMessageBufferSize()
          Returns the maximum size of binary message in number of bytes that this container will buffer.
 long getMaxSessionIdleTimeout()
          Return the maximum time in seconds that a web socket session may be idle before the container may close it.
 long getMaxTextMessageBufferSize()
          Sets the maximum size of text message in number of bytes that this container will buffer.
 java.lang.String getPath()
           
 int getPort()
           
 void publishServer(javax.net.websocket.Endpoint endpoint, javax.net.websocket.ServerConfiguration ilc)
          Publish the given endpoint with the provided configuration information.
 void setApplicationLevelClassLoader(java.lang.ClassLoader applicationLevelClassLoader)
           
 void setMaxBinaryMessageBufferSize(long max)
          Sets the maximum size of binary message in number of bytes that this container will buffer.
 void setMaxSessionIdleTimeout(long timeout)
          Sets the maximum time in seconds that a web socket session may be idle before the container may close it.
 void setMaxTextMessageBufferSize(long max)
          Returns the maximum size of text message in number of bytes that this container will buffer.
static void setWebMode(boolean b)
           
 java.lang.String toString()
           
 java.util.Map<java.lang.String,java.lang.Object> XgetProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerContainerImpl

public ServerContainerImpl(BeanServer beanServer,
                           java.lang.String wsPath,
                           int port)
Method Detail

setApplicationLevelClassLoader

public void setApplicationLevelClassLoader(java.lang.ClassLoader applicationLevelClassLoader)

getApplicationLevelClassLoader

public java.lang.ClassLoader getApplicationLevelClassLoader()

getPath

public java.lang.String getPath()

getPort

public int getPort()

setWebMode

public static void setWebMode(boolean b)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

publishServer

public void publishServer(javax.net.websocket.Endpoint endpoint,
                          javax.net.websocket.ServerConfiguration ilc)
Publish the given endpoint with the provided configuration information.

Specified by:
publishServer in interface javax.net.websocket.ServerContainer
Parameters:
endpoint -
ilc -

connectToServer

public void connectToServer(javax.net.websocket.Endpoint endpoint,
                            javax.net.websocket.ClientConfiguration olc)
Specified by:
connectToServer in interface javax.net.websocket.ClientContainer

getActiveSessions

public java.util.Set<javax.net.websocket.Session> getActiveSessions()
Return an unordered collection of the currently active web socket sessions.

Specified by:
getActiveSessions in interface javax.net.websocket.ClientContainer
Returns:

getMaxSessionIdleTimeout

public long getMaxSessionIdleTimeout()
Return the maximum time in seconds that a web socket session may be idle before the container may close it.

Specified by:
getMaxSessionIdleTimeout in interface javax.net.websocket.ClientContainer
Returns:

setMaxSessionIdleTimeout

public void setMaxSessionIdleTimeout(long timeout)
Sets the maximum time in seconds that a web socket session may be idle before the container may close it.

Specified by:
setMaxSessionIdleTimeout in interface javax.net.websocket.ClientContainer

getMaxBinaryMessageBufferSize

public long getMaxBinaryMessageBufferSize()
Returns the maximum size of binary message in number of bytes that this container will buffer.

Specified by:
getMaxBinaryMessageBufferSize in interface javax.net.websocket.ClientContainer
Returns:

setMaxBinaryMessageBufferSize

public void setMaxBinaryMessageBufferSize(long max)
Sets the maximum size of binary message in number of bytes that this container will buffer.

Specified by:
setMaxBinaryMessageBufferSize in interface javax.net.websocket.ClientContainer

getMaxTextMessageBufferSize

public long getMaxTextMessageBufferSize()
Sets the maximum size of text message in number of bytes that this container will buffer.

Specified by:
getMaxTextMessageBufferSize in interface javax.net.websocket.ClientContainer
Returns:

setMaxTextMessageBufferSize

public void setMaxTextMessageBufferSize(long max)
Returns the maximum size of text message in number of bytes that this container will buffer.

Specified by:
setMaxTextMessageBufferSize in interface javax.net.websocket.ClientContainer

XgetProperties

public java.util.Map<java.lang.String,java.lang.Object> XgetProperties()


Copyright © 2012. All Rights Reserved.