Top Fields Constructors Methods
org.eclipse.jetty.websocket.core.server.internal

public Class CreatorNegotiator

extends AbstractNegotiator
Class Inheritance
Imports
java.util.concurrent.atomic.AtomicReference, org.eclipse.jetty.server.Context, org.eclipse.jetty.util.Callback, org.eclipse.jetty.websocket.core.FrameHandler, org.eclipse.jetty.websocket.core.server.FrameHandlerFactory, .ServerUpgradeRequest, .ServerUpgradeResponse, .WebSocketCreator, .WebSocketNegotiator

Field Summary

Modifier and TypeField and Description
private final WebSocketCreator
private final FrameHandlerFactory

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public WebSocketCreator
public FrameHandler
negotiate(ServerUpgradeRequest
the request details
request
,
ServerUpgradeResponse
the response details
response
,
Callback
the callback, should only be completed by the creator if a null WebSocket object is returned.
callback
)

Implements org.eclipse.jetty.websocket.core.server.WebSocketNegotiator.negotiate.

Creates a FrameHandler from the incoming request.

public String
toString()

Overrides org.eclipse.jetty.websocket.core.Configuration.ConfigurationCustomizer.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jetty.websocket.core.server.WebSocketNegotiator.AbstractNegotiator:
customize

Field Detail

creatorback to summary
private final WebSocketCreator creator
factoryback to summary
private final FrameHandlerFactory factory

Constructor Detail

CreatorNegotiatorback to summary
public CreatorNegotiator(WebSocketCreator creator, FrameHandlerFactory factory)
CreatorNegotiatorback to summary
public CreatorNegotiator(WebSocketCreator creator, FrameHandlerFactory factory, Configuration.Customizer customizer)

Method Detail

getWebSocketCreatorback to summary
public WebSocketCreator getWebSocketCreator()
negotiateback to summary
public FrameHandler negotiate(ServerUpgradeRequest request, ServerUpgradeResponse response, Callback callback)

Implements org.eclipse.jetty.websocket.core.server.WebSocketNegotiator.negotiate.

Doc from org.eclipse.jetty.websocket.core.server.WebSocketNegotiator.negotiate.

Creates a FrameHandler from the incoming request.

If the negotiator returns null it is responsible for completing the Callback and sending a response. If the negotiator intends to return non-null FrameHandler, it MUST NOT write content to the response or complete the Callback, but it may modify the response headers.

Parameters
request:ServerUpgradeRequest

the request details

response:ServerUpgradeResponse

the response details

callback:Callback

the callback, should only be completed by the creator if a null WebSocket object is returned.

Returns:FrameHandler

the FrameHandler, or null to take responsibility to send error response if no WebSocket is to be created.

Annotations
@Override
toStringback to summary
public String toString()

Overrides org.eclipse.jetty.websocket.core.Configuration.ConfigurationCustomizer.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override