• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java StreamSourceFrameChannel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中io.undertow.websockets.core.StreamSourceFrameChannel的典型用法代码示例。如果您正苦于以下问题:Java StreamSourceFrameChannel类的具体用法?Java StreamSourceFrameChannel怎么用?Java StreamSourceFrameChannel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StreamSourceFrameChannel类属于io.undertow.websockets.core包,在下文中一共展示了StreamSourceFrameChannel类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getChannel

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
@Override
public StreamSourceFrameChannel getChannel(Pooled<ByteBuffer> pooled) {
    StreamSourceFrameChannel channel = createChannel(pooled);
    if (frameFinalFlag) {
        channel.finalFrame();
    } else {
        fragmentedChannel = channel;
    }
    return channel;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:11,代码来源:WebSocket07Channel.java


示例2: getExistingChannel

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
@Override
public AbstractFramedStreamSourceChannel<?, ?, ?> getExistingChannel() {
    if (frameOpcode == OPCODE_CONT) {
        StreamSourceFrameChannel ret = fragmentedChannel;
        if(frameFinalFlag) {
            fragmentedChannel = null;
        }
        return ret;
    }
    return null;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:WebSocket07Channel.java


示例3: onClose

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
@Override
protected void onClose(WebSocketChannel webSocketChannel, StreamSourceFrameChannel ssfchannel) throws IOException {
  LOGGER.info("onClose: " + this);
  myChannel.getReceiveSetter().set(null);
  unregisterSession(WebSocketSession.this);
  super.onClose(webSocketChannel, ssfchannel);
}
 
开发者ID:jbenech,项目名称:gnikrap,代码行数:8,代码来源:EV3SriptCommandSocketConnectionCallback.java


示例4: createChannel

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
public StreamSourceFrameChannel createChannel(Pooled<ByteBuffer> pooled) {


            // Processing ping/pong/close frames because they cannot be
            // fragmented as per spec
            if (frameOpcode == OPCODE_PING) {
                if (frameMasked) {
                    return new WebSocket07PingFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, new Masker(maskingKey), pooled, framePayloadLength);
                } else {
                    return new WebSocket07PingFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, pooled, framePayloadLength);
                }
            }
            if (frameOpcode == OPCODE_PONG) {
                if (frameMasked) {
                    return new WebSocket07PongFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, new Masker(maskingKey), pooled, framePayloadLength);
                } else {
                    return new WebSocket07PongFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, pooled, framePayloadLength);
                }
            }
            if (frameOpcode == OPCODE_CLOSE) {
                if (frameMasked) {
                    return new WebSocket07CloseFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, new Masker(maskingKey), pooled, framePayloadLength);
                } else {
                    return new WebSocket07CloseFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, pooled, framePayloadLength);
                }
            }

            if (frameOpcode == OPCODE_TEXT) {
                // try to grab the checker which was used before
                UTF8Checker checker = WebSocket07Channel.this.checker;
                if (checker == null) {
                    checker = new UTF8Checker();
                }

                if (!frameFinalFlag) {
                    // if this is not the final fragment store the used checker to use it in later fragments also
                    WebSocket07Channel.this.checker = checker;
                } else {
                    // was the final fragment reset the checker to null
                    WebSocket07Channel.this.checker = null;
                }

                if (frameMasked) {
                    return new WebSocket07TextFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, frameFinalFlag, new Masker(maskingKey), checker, pooled, framePayloadLength);
                } else {
                    return new WebSocket07TextFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, frameFinalFlag, checker, pooled, framePayloadLength);
                }
            } else if (frameOpcode == OPCODE_BINARY) {
                if (frameMasked) {
                    return new WebSocket07BinaryFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, frameFinalFlag, new Masker(maskingKey), pooled, framePayloadLength);
                } else {
                    return new WebSocket07BinaryFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, frameFinalFlag, pooled, framePayloadLength);
                }
            } else if (frameOpcode == OPCODE_CONT) {
                final ChannelFunction[] functions;
                if (frameMasked && checker != null) {
                    functions = new ChannelFunction[2];
                    functions[0] = new Masker(maskingKey);
                    functions[1] = checker;
                } else if (frameMasked) {
                    functions = new ChannelFunction[1];
                    functions[0] = new Masker(maskingKey);
                } else if (checker != null) {
                    functions = new ChannelFunction[1];
                    functions[0] = checker;
                } else {
                    functions = EMPTY_FUNCTIONS;
                }
                if (frameMasked) {
                    return new WebSocket07ContinuationFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, frameFinalFlag, pooled, framePayloadLength, functions);
                } else {
                    return new WebSocket07ContinuationFrameSourceChannel(WebSocket07Channel.this, framePayloadLength, frameRsv, frameFinalFlag, pooled, framePayloadLength, functions);
                }
            } else {
                throw WebSocketMessages.MESSAGES.unsupportedOpCode(frameOpcode);
            }
        }
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:78,代码来源:WebSocket07Channel.java


示例5: onClose

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
@Override
protected void onClose(WebSocketChannel webSocketChannel, StreamSourceFrameChannel channel)
    throws IOException {
  activeChannels.remove(webSocketChannel);
  super.onClose(webSocketChannel, channel);
}
 
开发者ID:digitalfondue,项目名称:stampo,代码行数:7,代码来源:ServeAndWatch.java


示例6: onClose

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
@Override
protected void onClose(final WebSocketChannel webSocketChannel, final StreamSourceFrameChannel channel) throws IOException {
    super.onClose(webSocketChannel, channel);

    UaiWebSocketContext.removeClosed();
}
 
开发者ID:uaihebert,项目名称:uaiMockServer,代码行数:7,代码来源:UaiWebSocketListener.java


示例7: isClosingWithoutError

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
@Test
public void isClosingWithoutError() throws IOException {
    final UaiWebSocketListenerTest uaiWebSocketListenerTest = new UaiWebSocketListenerTest();

    uaiWebSocketListenerTest.onClose(Mockito.mock(WebSocket07Channel.class), Mockito.mock(StreamSourceFrameChannel.class));
}
 
开发者ID:uaihebert,项目名称:uaiMockServer,代码行数:7,代码来源:UaiWebSocketListenerTest.java


示例8: onClose

import io.undertow.websockets.core.StreamSourceFrameChannel; //导入依赖的package包/类
@Override
protected void onClose(WebSocketChannel socket, StreamSourceFrameChannel channel) throws IOException {
    super.onClose(socket, channel);
    if (this.chan.remove(socket))
        onDisconnected(socket);
}
 
开发者ID:automenta,项目名称:spimedb,代码行数:7,代码来源:Session.java



注:本文中的io.undertow.websockets.core.StreamSourceFrameChannel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SeekStatus类代码示例发布时间:2022-05-23
下一篇:
Java PowerHostUtilizationHistory类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap