gpt4 book ai didi

org.glassfish.grizzly.websockets.WebSocketEngine类的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 16:43:05 27 4
gpt4 key购买 nike

本文整理了Java中org.glassfish.grizzly.websockets.WebSocketEngine类的一些代码示例,展示了WebSocketEngine类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebSocketEngine类的具体详情如下:
包路径:org.glassfish.grizzly.websockets.WebSocketEngine
类名称:WebSocketEngine

WebSocketEngine介绍

[英]WebSockets engine implementation (singleton), which handles WebSocketApplications registration, responsible for client and server handshake validation.
[中]WebSockets引擎实现(singleton),处理WebSocketApplication注册,负责客户端和服务器握手验证。

代码示例

代码示例来源:origin: javaee/grizzly

protected boolean doServerUpgrade(final FilterChainContext ctx,
                 final HttpContent requestContent) throws IOException {
  return !WebSocketEngine.getEngine().upgrade(ctx, requestContent);
}

代码示例来源:origin: org.glassfish.tyrus/websocket-provider-grizzly

@Override
public void unregister(SPIRegisteredEndpoint ge) {
  this.engine.unregister((GrizzlyEndpoint) ge);
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

public WebSocketApplication getApplication(HttpRequestPacket request) {
  final WebSocketApplicationReg appReg = getApplication(request, mapper);
  return appReg != null ? appReg.app : null;
}

代码示例来源:origin: javaee/grizzly

(HttpRequestPacket) requestContent.getHttpHeader();
final WebSocketApplicationReg reg =
    WebSocketEngine.getEngine().getApplication(request, mapper);
    final ProtocolHandler protocolHandler = loadHandler(request.getHeaders());
    if (protocolHandler == null) {
      handleUnsupportedVersion(ctx, request);
      return false;

代码示例来源:origin: javaee/grizzly

String contextPathLocal = getContextPath(contextPath);
final String fullPath = contextPathLocal + '|' + urlPattern;
  unregister(oldApp);

代码示例来源:origin: org.glassfish.websocket/websocket-impl

public void closeWebSocketServer() {
  for (WebSocketApplication wsa : this.applications) {
    ((WebSocketEndpoint) wsa).remove();
    WebSocketEngine.getEngine().unregister(wsa);
    logger.info("Closing down : " + wsa);
  }
}

代码示例来源:origin: org.glassfish.websocket/websocket-impl

void deploy(WebSocketApplication wsa) {
  WebSocketEngine.getEngine().register(wsa);
  this.applications.add(wsa);
  logger.info("Registered a " + wsa.getClass() + " at " + ((WebSocketEndpoint) wsa).getPath());
}

代码示例来源:origin: javaee/grizzly

public boolean upgrade(FilterChainContext ctx, HttpContent requestContent)
    throws IOException {
  return upgrade(ctx, requestContent, null);
}

代码示例来源:origin: org.glassfish.tyrus/websocket-provider-grizzly

public GrizzlyEngine() {
  engine = WebSocketEngine.getEngine();
}

代码示例来源:origin: org.glassfish.tyrus/websocket-provider-grizzly

@Override
public SPIRegisteredEndpoint register(SPIEndpoint endpoint) {
  GrizzlyEndpoint ge =  new GrizzlyEndpoint(endpoint);
  this.engine.register(ge);
  return ge;
}

代码示例来源:origin: javaee/grizzly

(HttpRequestPacket) requestContent.getHttpHeader();
final WebSocketApplicationReg reg =
    WebSocketEngine.getEngine().getApplication(request, mapper);
    final ProtocolHandler protocolHandler = loadHandler(request.getHeaders());
    if (protocolHandler == null) {
      handleUnsupportedVersion(ctx, request);
      return false;

代码示例来源:origin: javaee/grizzly

String contextPathLocal = getContextPath(contextPath);
final String fullPath = contextPathLocal + '|' + urlPattern;
  unregister(oldApp);

代码示例来源:origin: ch.squaredesk.nova/websockets

WebSocketEngine.getEngine().register("", destinationForSubscription, app);

代码示例来源:origin: javaee/grizzly

public boolean upgrade(FilterChainContext ctx, HttpContent requestContent)
    throws IOException {
  return upgrade(ctx, requestContent, null);
}

代码示例来源:origin: javaee/grizzly

(HttpRequestPacket) requestContent.getHttpHeader();
final WebSocketApplicationReg reg =
    WebSocketEngine.getEngine().getApplication(request, mapper);
    final ProtocolHandler protocolHandler = loadHandler(request.getHeaders());
    if (protocolHandler == null) {
      handleUnsupportedVersion(ctx, request);
      return false;

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

protected boolean doServerUpgrade(final FilterChainContext ctx,
                 final HttpContent requestContent) throws IOException {
  return !WebSocketEngine.getEngine().upgrade(ctx, requestContent);
}

代码示例来源:origin: javaee/grizzly

String contextPathLocal = getContextPath(contextPath);
final String fullPath = contextPathLocal + '|' + urlPattern;
  unregister(oldApp);

代码示例来源:origin: javaee/grizzly

public WebSocketApplication getApplication(HttpRequestPacket request) {
  final WebSocketApplicationReg appReg = getApplication(request, mapper);
  return appReg != null ? appReg.app : null;
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-websockets

public boolean upgrade(FilterChainContext ctx, HttpContent requestContent)
    throws IOException {
  return upgrade(ctx, requestContent, null);
}

代码示例来源:origin: javaee/grizzly

(HttpRequestPacket) requestContent.getHttpHeader();
final WebSocketApplicationReg reg =
    WebSocketEngine.getEngine().getApplication(request, mapper);
    final ProtocolHandler protocolHandler = loadHandler(request.getHeaders());
    if (protocolHandler == null) {
      handleUnsupportedVersion(ctx, request);
      return false;

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com