org.apache.catalina.websocket.StreamInbound Java Examples
The following examples show how to use
org.apache.catalina.websocket.StreamInbound.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PushServlet.java From ALLGO with Apache License 2.0 | 5 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { int uid = -1; if(request.getSession(false) != null){ uid = (int) request.getSession(false).getAttribute("uid"); } System.out.println("请求登录==>uid:"+uid); ChatMessageInbound cmi = new ChatMessageInbound(uid); return cmi; }
Example #2
Source File: SynchronizeFXTomcatServlet.java From SynchronizeFX with GNU Lesser General Public License v3.0 | 5 votes |
@Override protected StreamInbound createWebSocketInbound(final String subProtocol, final HttpServletRequest request) { // TODO validate sub protocol and find out how to refuse connections that send an unsupported sub protocol. final String channelName = getChannelName(request); synchronized (channels) { return new SynchronizeFXTomcatConnection(channels.get(channelName)); } }
Example #3
Source File: EchoMessage.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new EchoMessageInbound(byteBufSize,charBufSize); }
Example #4
Source File: EchoStream.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new EchoStreamInbound(); }
Example #5
Source File: ChatWebSocketServlet.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new ChatMessageInbound(connectionIds.incrementAndGet()); }
Example #6
Source File: SnakeWebSocketServlet.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new SnakeMessageInbound(connectionIds.incrementAndGet()); }
Example #7
Source File: EchoMessage.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new EchoMessageInbound(byteBufSize,charBufSize); }
Example #8
Source File: EchoStream.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new EchoStreamInbound(); }
Example #9
Source File: ChatWebSocketServlet.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new ChatMessageInbound(connectionIds.incrementAndGet()); }
Example #10
Source File: SnakeWebSocketServlet.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new SnakeMessageInbound(connectionIds.incrementAndGet()); }
Example #11
Source File: EchoMessage.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new EchoMessageInbound(byteBufSize,charBufSize); }
Example #12
Source File: EchoStream.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new EchoStreamInbound(); }
Example #13
Source File: ChatWebSocketServlet.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new ChatMessageInbound(connectionIds.incrementAndGet()); }
Example #14
Source File: SnakeWebSocketServlet.java From tomcatsrc with Apache License 2.0 | 4 votes |
@Override protected StreamInbound createWebSocketInbound(String subProtocol, HttpServletRequest request) { return new SnakeMessageInbound(connectionIds.incrementAndGet()); }