org.glassfish.tyrus.server
Interface ServerConfiguration

All Known Implementing Classes:
DefaultServerConfiguration

public interface ServerConfiguration

Represents server configuration. Can be used to provide the list of registered endpoints, extensions, buffer limits, and timeouts to the server during its initialization. Once the server is initialized with this configuration, any modifications to the configuration may not be reflected in the running server.

Author:
Martin Matula (martin.matula at oracle.com)

Method Summary
 Set<Class<?>> getEndpointClasses()
          Returns a set of endpoint classes annotated with WebSocketEndpoint annotation that should be published by the container initialized with this configuration object.
 Set<javax.websocket.Endpoint> getEndpointInstances()
          Returns a set of Endpoint instances that should be exposed by the server in addition to the class-based endpoints returned from getEndpointClasses().
 List<String> getExtensions()
          Return a mutable list of extension names supported by the container.
 long getMaxBinaryMessageBufferSize()
          Returns the maximum size of binary message 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()
          Gets the maximum size of text message that this container will buffer.
 

Method Detail

getEndpointClasses

Set<Class<?>> getEndpointClasses()
Returns a set of endpoint classes annotated with WebSocketEndpoint annotation that should be published by the container initialized with this configuration object.

Returns:
Set of annotated endpoint classes to be exposed by the server.

getEndpointInstances

Set<javax.websocket.Endpoint> getEndpointInstances()
Returns a set of Endpoint instances that should be exposed by the server in addition to the class-based endpoints returned from getEndpointClasses().

Returns:
Set of endpoint objects.

getMaxSessionIdleTimeout

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

Returns:
the number of seconds idle wed socket sessions are active.

getMaxBinaryMessageBufferSize

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

Returns:
the maximum size of binary message in number of bytes.

getMaxTextMessageBufferSize

long getMaxTextMessageBufferSize()
Gets the maximum size of text message that this container will buffer.

Returns:
the maximum size of text message in number of bytes.

getExtensions

List<String> getExtensions()
Return a mutable list of extension names supported by the container.

Returns:
the mutable set of extension names.


Copyright © 2012. All Rights Reserved.